From: Kent Overstreet Date: Mon, 19 May 2014 15:57:55 +0000 (-0700) Subject: bcache: Make sure to pass GFP_WAIT to mempool_alloc() X-Git-Tag: v3.12.37~40 X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0a8ea21073b520c39ab577ed663baeff20a0fb4;p=linux 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 Cc: Gabriel de Perthuis Signed-off-by: Jiri Slaby --- diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index d1734d9d9c79..26ca4db908b9 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -141,7 +141,7 @@ static void bch_btree_node_read_done(struct btree *b) struct bset *i = b->sets[0].data; 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;