Re: [PATCH 09/15] xfs: remove indirect calls from xfs_inode_walk{,_ag}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 02, 2021 at 03:25:46PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> It turns out that there is a 1:1 mapping between the execute and goal
> parameters that are passed to xfs_inode_walk_ag:
> 
> 	xfs_blockgc_scan_inode <=> XFS_ICWALK_BLOCKGC
> 	xfs_dqrele_inode <=> XFS_ICWALK_DQRELE
> 
> Because of this exact correspondence, we don't need the execute function
> pointer and can replace it with a direct call.
> 
> For the price of a forward static declaration, we can eliminate the
> indirect function call.  This likely has a negligible impact on
> performance (since the execute function runs transactions), but it also
> simplifies the function signature.
> 
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> ---
>  fs/xfs/xfs_icache.c |   60 +++++++++++++++++++++++++++++++--------------------
>  1 file changed, 36 insertions(+), 24 deletions(-)

Cleans up nicely :)

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux