From: Kent Overstreet Date: Wed, 12 Jun 2019 01:03:23 +0000 (-0400) Subject: bcachefs: use memalloc_nofs_save() for vmalloc allocation X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e0dfc08bc2f509de9fda0371b46988247f711a12;p=linux.git bcachefs: use memalloc_nofs_save() for vmalloc allocation Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/btree_cache.c b/fs/bcachefs/btree_cache.c index d80ba1d718263..ea775d91de676 100644 --- a/fs/bcachefs/btree_cache.c +++ b/fs/bcachefs/btree_cache.c @@ -9,6 +9,7 @@ #include "trace.h" #include +#include const char * const bch2_btree_ids[] = { #define x(kwd, val, name) name, @@ -509,7 +510,9 @@ struct btree *bch2_btree_node_mem_alloc(struct bch_fs *c) struct btree_cache *bc = &c->btree_cache; struct btree *b; u64 start_time = local_clock(); + unsigned flags; + flags = memalloc_nofs_save(); mutex_lock(&bc->lock); /* @@ -547,6 +550,7 @@ out_unlock: list_del_init(&b->list); mutex_unlock(&bc->lock); + memalloc_nofs_restore(flags); out: b->flags = 0; b->written = 0;