]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: protect space cache inode alloc with GFP_NOFS
authorJosef Bacik <josef@toxicpanda.com>
Fri, 28 Sep 2018 11:17:49 +0000 (07:17 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:12:54 +0000 (11:12 -0800)
commit6078b6126651588fb0131fbbb95ce17e2eb9498b
tree2cae20a36b3b581b814a40704869451498e3b950
parentff9e68fd136b1f3db80d2a38cb10645d8eb7f858
btrfs: protect space cache inode alloc with GFP_NOFS

commit 84de76a2fb217dc1b6bc2965cc397d1648aa1404 upstream.

If we're allocating a new space cache inode it's likely going to be
under a transaction handle, so we need to use memalloc_nofs_save() in
order to avoid deadlocks, and more importantly lockdep messages that
make xfstests fail.

CC: stable@vger.kernel.org # 4.4+
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/free-space-cache.c