[3.16.y-ckt stable] Patch "bcache: Make sure to pass GFP_WAIT to mempool_alloc()" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Mon Jan 19 13:37:08 UTC 2015


This is a note to let you know that I have just added a patch titled

    bcache: Make sure to pass GFP_WAIT to mempool_alloc()

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt5.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From c71bf6079c2aba7378b20b6a7751945005cb1ecf Mon Sep 17 00:00:00 2001
From: Kent Overstreet <kmo at daterainc.com>
Date: Mon, 19 May 2014 08:57:55 -0700
Subject: bcache: Make sure to pass GFP_WAIT to mempool_alloc()

commit bcf090e0040e30f8409e6a535a01e6473afb096f upstream.

this was very wrong - mempool_alloc() only guarantees success with GFP_WAIT.
bcache uses GFP_NOWAIT in various other places where we have a fallback,
circuits must've gotten crossed when writing this code or something.

Signed-off-by: Kent Overstreet <kmo at daterainc.com>
Cc: Gabriel de Perthuis <g2p.code at gmail.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/md/bcache/btree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 7347b6100961..5ef445d2d81e 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -202,7 +202,7 @@ void bch_btree_node_read_done(struct btree *b)
 	struct bset *i = btree_bset_first(b);
 	struct btree_iter *iter;

-	iter = mempool_alloc(b->c->fill_iter, GFP_NOWAIT);
+	iter = mempool_alloc(b->c->fill_iter, GFP_NOIO);
 	iter->size = b->c->sb.bucket_size / b->c->sb.block_size;
 	iter->used = 0;

--
2.1.4





More information about the kernel-team mailing list