Skip to content

Commit 9af503d

Browse files
martinetdkdave
authored andcommitted
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%[email protected] Reported-by: Pavel Machek <[email protected]> Fixes: 7411055 ("btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks()") CC: [email protected] Reviewed-by: Pavel Machek <[email protected]> Signed-off-by: Dominique Martinet <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent fe1c6c7 commit 9af503d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/btrfs/volumes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3419,6 +3419,7 @@ static int btrfs_relocate_sys_chunks(struct btrfs_fs_info *fs_info)
34193419
* alignment and size).
34203420
*/
34213421
ret = -EUCLEAN;
3422+
mutex_unlock(&fs_info->reclaim_bgs_lock);
34223423
goto error;
34233424
}
34243425

0 commit comments

Comments
 (0)