]> git.ipfire.org Git - people/arne_f/kernel.git/commit
btrfs: fix deadlock when writing out space cache
authorJosef Bacik <jbacik@fb.com>
Wed, 15 Nov 2017 21:20:52 +0000 (16:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Feb 2018 16:39:04 +0000 (17:39 +0100)
commit928066e61940e3c19f85d543d15c55fcae20208f
treeb7d923c78aaeba96d8709e8502b4a1885220271a
parent841211271eccb49f7f4a71442c13a09d4b6a92b0
btrfs: fix deadlock when writing out space cache

[ Upstream commit b77000ed558daa3bef0899d29bf171b8c9b5e6a8 ]

If we fail to prepare our pages for whatever reason (out of memory in
our case) we need to make sure to drop the block_group->data_rwsem,
otherwise hilarity ensues.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ add label and use existing unlocking code ]
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/free-space-cache.c