]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix mutex unlock without prior lock on space cache truncation
authorFilipe Manana <fdmanana@suse.com>
Thu, 30 Apr 2015 16:47:05 +0000 (17:47 +0100)
committerChris Mason <clm@fb.com>
Wed, 3 Jun 2015 02:34:34 +0000 (19:34 -0700)
commit4df53cb3ce937ed9bd0fb24f6a9e53a05be43036
tree390f8b66884310a7c9531275425af2e467f8eb4e
parent3eef48b683fb448d9d1d32d26f726251ea4c06a9
Btrfs: fix mutex unlock without prior lock on space cache truncation

If the call to btrfs_truncate_inode_items() failed and we don't have a block
group, we were unlocking the cache_write_mutex without having locked it (we
do it only if we have a block group).

Fixes: 6a258f627cc1 ("Btrfs: allow block group cache writeout
                      outside critical section in commit")

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/free-space-cache.c