diff mbox

null_blk: add lightnvm null_blk device to the nullb_list

Message ID 1457108824-3792-1-git-send-email-ww.tao0320@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Jens Axboe
Headers show

Commit Message

Wenwei Tao March 4, 2016, 4:27 p.m. UTC
After register null_blk devices into lightnvm, we forget
to add these devices to the the nullb_list, makes them
invisible to the null_blk driver.

Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
---
 drivers/block/null_blk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jens Axboe March 4, 2016, 4:33 p.m. UTC | #1
On 03/04/2016 09:27 AM, Wenwei Tao wrote:
> After register null_blk devices into lightnvm, we forget
> to add these devices to the the nullb_list, makes them
> invisible to the null_blk driver.
>
> Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
> ---
>   drivers/block/null_blk.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c
> index 64a7b59..cab9759 100644
> --- a/drivers/block/null_blk.c
> +++ b/drivers/block/null_blk.c
> @@ -742,10 +742,11 @@ static int null_add_dev(void)
>
>   	add_disk(disk);
>
> +done:
>   	mutex_lock(&lock);
>   	list_add_tail(&nullb->list, &nullb_list);
>   	mutex_unlock(&lock);
> -done:
> +
>   	return 0;
>
>   out_cleanup_lightnvm:

Thanks, that looks like a regression caused by a514379b0c77, I'll add a 
Fixes tag.
diff mbox

Patch

diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c
index 64a7b59..cab9759 100644
--- a/drivers/block/null_blk.c
+++ b/drivers/block/null_blk.c
@@ -742,10 +742,11 @@  static int null_add_dev(void)
 
 	add_disk(disk);
 
+done:
 	mutex_lock(&lock);
 	list_add_tail(&nullb->list, &nullb_list);
 	mutex_unlock(&lock);
-done:
+
 	return 0;
 
 out_cleanup_lightnvm: