Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1326854 > unrolled thread
| Started by | Matias Bjørling <m@bjorling.me> |
|---|---|
| First post | 2016-02-04 15:20 +0100 |
| Last post | 2016-02-04 15:20 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/5] lightnvm: put bio before return Matias Bjørling <m@bjorling.me> - 2016-02-04 15:20 +0100
| From | Matias Bjørling <m@bjorling.me> |
|---|---|
| Date | 2016-02-04 15:20 +0100 |
| Subject | [PATCH 1/5] lightnvm: put bio before return |
| Message-ID | <qYsVj-1nc-7@gated-at.bofh.it> |
From: Wenwei Tao <ww.tao0320@gmail.com>
The bio is not returned if the data page cannot be allocated.
Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
---
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 c4d0b04..775bf6c2 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) {
--
2.1.4
Back to top | Article view | linux.kernel
csiph-web