xfs: streamline xfs_filestream_pick_ag
authorChristoph Hellwig <hch@lst.de>
Wed, 23 Oct 2024 13:37:23 +0000 (15:37 +0200)
committerCarlos Maiolino <cem@kernel.org>
Wed, 30 Oct 2024 10:27:18 +0000 (11:27 +0100)
commit81a1e1c32ef474c20ccb9f730afe1ac25b1c62a4
tree239ac6892f198ca198ad7bcec7291a0317cee020
parentdc60992ce76fbc2f71c2674f435ff6bde2108028
xfs: streamline xfs_filestream_pick_ag

Directly return the error from xfs_bmap_longest_free_extent instead
of breaking from the loop and handling it there, and use a done
label to directly jump to the exist when we found a suitable perag
structure to reduce the indentation level and pag/max_pag check
complexity in the tail of the function.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_filestream.c