summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorWenwei Tao <ww.tao0320@gmail.com>2016-03-04 17:27:04 +0100
committerJens Axboe <axboe@fb.com>2016-03-19 02:10:37 +0100
commit3681c85dffda70e551dead31c8d102bd69033fe8 (patch)
tree787f9f90717596527f6efcde75201624c39ed322 /drivers/block
parentMerge branch 'for-4.6/drivers' of git://git.kernel.dk/linux-block (diff)
downloadlinux-3681c85dffda70e551dead31c8d102bd69033fe8.tar.xz
linux-3681c85dffda70e551dead31c8d102bd69033fe8.zip
null_blk: add lightnvm null_blk device to the nullb_list
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> Fixes: a514379b0c77 ("null_blk: oops when initializing without lightnvm") Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/null_blk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c
index 64a7b5971b57..cab97593ba54 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: