Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 928066e6 authored by Josef Bacik's avatar Josef Bacik Committed by Greg Kroah-Hartman
Browse files

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: default avatarJosef Bacik <jbacik@fb.com>
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Reviewed-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
[ add label and use existing unlocking code ]
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>

Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 84121127
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment