Re: [PATCH 4/5] xfs: remove unused is_rt_data_fork() function

Darrick J. Wong
2024-04-03T03:54:10Z

On Wed, Apr 03, 2024 at 08:28:31AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> Sparse warns that is_rt_data_fork() is unused. Indeed, it is a
> static inline function that isn't used in the file it is defined in.
> It looks like xfs_ifork_is_realtime() has superceded this function,
> so remove it and get rid of the sparse warning.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
> fs/xfs/scrub/rmap_repair.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/fs/xfs/scrub/rmap_repair.c b/fs/xfs/scrub/rmap_repair.c
> index e8e07b683eab..7e73ddfb3d44 100644
> --- a/fs/xfs/scrub/rmap_repair.c
> +++ b/fs/xfs/scrub/rmap_repair.c
> @@ -432,14 +432,6 @@ xrep_rmap_scan_iroot_btree(
> return error;
> }
>
> -static inline bool
> -is_rt_data_fork(
> - struct xfs_inode *ip,
> - int whichfork)
> -{
> - return XFS_IS_REALTIME_INODE(ip) && whichfork == XFS_DATA_FORK;
> -}
> -
> /*
> * Iterate the block mapping btree to collect rmap records for anything in this
> * fork that matches the AG. Sets @mappings_done to true if we've scanned the
> --
> 2.43.0
>
>