]> git.baikalelectronics.ru Git - 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)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Nov 2017 14:50:07 +0000 (15:50 +0100)
commita0e2a8e5376bd67fae67e3107b474d2b70d6271c
treedf4e2531b11c7a3ea309c9ee991d43090f2be4b5
parent7ddf380b732b677159e5cf6a0d98d9a3f0ee39b8
btrfs: fix deadlock when writing out space cache

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>
fs/btrfs/free-space-cache.c