[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1453975694-18305-1-git-send-email-ww.tao0320@gmail.com>
Date: Thu, 28 Jan 2016 18:08:14 +0800
From: Wenwei Tao <ww.tao0320@...il.com>
To: mb@...htnvm.io
Cc: linux-kernel@...r.kernel.org, linux-block@...r.kernel.org
Subject: [PATCH] lightnvm: put bio before return
Signed-off-by: Wenwei Tao <ww.tao0320@...il.com>
---
drivers/lightnvm/rrpc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index d8c7595..307db1e 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -300,8 +300,10 @@ static int rrpc_move_valid_pages(struct rrpc *rrpc, struct rrpc_block *rblk)
}
page = mempool_alloc(rrpc->page_pool, GFP_NOIO);
- if (!page)
+ if (!page) {
+ bio_put(bio);
return -ENOMEM;
+ }
while ((slot = find_first_zero_bit(rblk->invalid_pages,
nr_pgs_per_blk)) < nr_pgs_per_blk) {
--
1.8.3.1
Powered by blists - more mailing lists