Commit 9af503d9 authored by Dominique Martinet's avatar Dominique Martinet Committed by David Sterba

btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks()

The previous patch that replaced BUG_ON by error handling forgot to
unlock the mutex in the error path.

Link: https://lore.kernel.org/all/Zh%2fHpAGFqa7YAFuM@duo.ucw.czReported-by: default avatarPavel Machek <pavel@denx.de>
Fixes: 7411055d ("btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks()")
CC: stable@vger.kernel.org
Reviewed-by: default avatarPavel Machek <pavel@denx.de>
Signed-off-by: default avatarDominique Martinet <dominique.martinet@atmark-techno.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent fe1c6c7a
......@@ -3419,6 +3419,7 @@ static int btrfs_relocate_sys_chunks(struct btrfs_fs_info *fs_info)
* alignment and size).
*/
ret = -EUCLEAN;
mutex_unlock(&fs_info->reclaim_bgs_lock);
goto error;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment