diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-05-27 14:10:27 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:40 -0400 |
commit | 692c3f0601bd1b04b914a40907a36e4c36dc8edd (patch) | |
tree | 19ed81c578fcacf7a15d4660e79a484e038a214f | |
parent | aafcf9bc12f479b47f4bc1f008f4002dd1af91b8 (diff) | |
download | linux-stable-692c3f0601bd1b04b914a40907a36e4c36dc8edd.tar.gz linux-stable-692c3f0601bd1b04b914a40907a36e4c36dc8edd.tar.bz2 linux-stable-692c3f0601bd1b04b914a40907a36e4c36dc8edd.zip |
bcachefs: fix memalloc_nofs_restore() usage
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/btree_cache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_cache.c b/fs/bcachefs/btree_cache.c index 4ff57925fb2c..ef7ca552a0a3 100644 --- a/fs/bcachefs/btree_cache.c +++ b/fs/bcachefs/btree_cache.c @@ -554,7 +554,6 @@ out_unlock: list_del_init(&b->list); mutex_unlock(&bc->lock); - memalloc_nofs_restore(flags); out: b->flags = 0; b->written = 0; @@ -567,6 +566,7 @@ out: bch2_time_stats_update(&c->times[BCH_TIME_btree_node_mem_alloc], start_time); + memalloc_nofs_restore(flags); return b; err: /* Try to cannibalize another cached btree node: */ @@ -582,6 +582,7 @@ err: } mutex_unlock(&bc->lock); + memalloc_nofs_restore(flags); return ERR_PTR(-ENOMEM); } |