null_blk: use available 'dev' in nullb_device_power_store()
We already have this pointer, no need to use to_nullb_device() again. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
060fd198a3
commit
b3c3051220
1 changed files with 1 additions and 1 deletions
|
@ -375,7 +375,7 @@ static ssize_t nullb_device_power_store(struct config_item *item,
|
|||
|
||||
set_bit(NULLB_DEV_FL_CONFIGURED, &dev->flags);
|
||||
dev->power = newp;
|
||||
} else if (to_nullb_device(item)->power && !newp) {
|
||||
} else if (dev->power && !newp) {
|
||||
mutex_lock(&lock);
|
||||
dev->power = newp;
|
||||
null_del_dev(dev->nullb);
|
||||
|
|
Loading…
Reference in a new issue