]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: setup a nofs context for memory allocation at __btrfs_set_acl
authorFilipe Manana <fdmanana@suse.com>
Thu, 13 Dec 2018 21:16:56 +0000 (21:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 13:35:21 +0000 (14:35 +0100)
commitbc726ae072b256230915ff341cdc93a51259686c
tree4d83039964bf040d173fcf788b6c2a3fd0a0efbf
parent1255e28103afa7284cee26b278ea46e2c171d6fd
Btrfs: setup a nofs context for memory allocation at __btrfs_set_acl

commit a0873490660246db587849a9e172f2b7b21fa88a upstream.

We are holding a transaction handle when setting an acl, therefore we can
not allocate the xattr value buffer using GFP_KERNEL, as we could deadlock
if reclaim is triggered by the allocation, therefore setup a nofs context.

Fixes: 39a27ec1004e8 ("btrfs: use GFP_KERNEL for xattr and acl allocations")
CC: stable@vger.kernel.org # 4.9+
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.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/acl.c