Skip to content

Commit

Permalink
btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks()
Browse files Browse the repository at this point in the history
commit 9af503d upstream.

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]>
Signed-off-by: Dominique Martinet <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
martinetd authored and gregkh committed May 25, 2024
1 parent ea4105d commit 791d236
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -3277,6 +3277,7 @@ static int btrfs_relocate_sys_chunks(struct btrfs_fs_info *fs_info)
* alignment and size).
*/
ret = -EUCLEAN;
mutex_unlock(&fs_info->delete_unused_bgs_mutex);
goto error;
}

Expand Down

0 comments on commit 791d236

Please sign in to comment.