Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760221AbcCDQ2N (ORCPT ); Fri, 4 Mar 2016 11:28:13 -0500 Received: from mail-pf0-f171.google.com ([209.85.192.171]:34615 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759494AbcCDQ2G (ORCPT ); Fri, 4 Mar 2016 11:28:06 -0500 From: Wenwei Tao To: axboe@fb.com Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Subject: [PATCH] null_blk: add lightnvm null_blk device to the nullb_list Date: Sat, 5 Mar 2016 00:27:04 +0800 Message-Id: <1457108824-3792-1-git-send-email-ww.tao0320@gmail.com> X-Mailer: git-send-email 2.7.0.windows.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 667 Lines: 28 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 --- 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: -- 1.8.3.1