]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: remove pointless out label from add_new_free_space_info()
authorFilipe Manana <fdmanana@suse.com>
Wed, 11 Jun 2025 11:06:57 +0000 (12:06 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:58:01 +0000 (23:58 +0200)
commit61b43a937418cd769818159d8cc007eb888ea195
tree9c6b7fcb3d93b667c417974cb4583a5c508d9e43
parent44892c5a3e2d779fb056cbb69954d80e718edce1
btrfs: remove pointless out label from add_new_free_space_info()

We can just return directly if btrfs_insert_empty_item() fails, there is
no need to release the path before returning, as all callers (or upper
in the call chain) will free the path if they get an error from the call
to add_new_free_space_info(), which is also a common pattern everywhere
in btrfs. Finally there's no need to set 'ret' to 0 if the call to
btrfs_insert_empty_item() didn't fail, since 'ret' is already 0.

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/free-space-tree.c