]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
bcache: Make sure to pass GFP_WAIT to mempool_alloc()
authorKent Overstreet <kmo@daterainc.com>
Mon, 19 May 2014 15:57:55 +0000 (08:57 -0700)
committerLuis Henriques <luis.henriques@canonical.com>
Fri, 16 Jan 2015 14:34:51 +0000 (14:34 +0000)
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@daterainc.com>
Cc: Gabriel de Perthuis <g2p.code@gmail.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/md/bcache/btree.c

index 7347b61009615089e307fba6b5964fcb83ad2040..5ef445d2d81e427e1fed7d9d0e08fdc26ef895aa 100644 (file)
@@ -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;