Re: [PATCH] xfs: remove a few duplicated lines
From: Carlos Maiolino
Date: Thu Nov 26 2026 - 08:26:14 EST
On Thu, Nov 26, 2026 at 08:22:29PM +0800, Zizhi Wo wrote:
> From: Zizhi Wo <wozizhi@xxxxxxxxxx>
>
> Remove duplicated lines:
> - xfs_alloc_read_agf() checks pagf_freeblks twice.
> - xfs_ondisk.h checks the size of struct xfs_attrlist twice.
> - xfs_rtgroup.h declares xfs_rtginode_irele() twice.
>
> No functional changes.
This patch does not apply cleanly as it conflicts with another patch
that has been enqueued in for-next for almost a month...
Please make sure your patches apply cleanly to xfs-linux/for-next before
submitting them.
Also add the proper "Fixes:" tags as appropriate.
>
> Signed-off-by: Zizhi Wo <wozizhi@xxxxxxxxxx>
> ---
> fs/xfs/libxfs/xfs_alloc.c | 1 -
> fs/xfs/libxfs/xfs_ondisk.h | 1 -
> fs/xfs/libxfs/xfs_rtgroup.h | 2 --
> 3 files changed, 4 deletions(-)
>
> diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
> index ae221a158764..2c5b73803a6b 100644
> --- a/fs/xfs/libxfs/xfs_alloc.c
> +++ b/fs/xfs/libxfs/xfs_alloc.c
> @@ -3509,7 +3509,6 @@ xfs_alloc_read_agf(
> if (!xfs_is_shutdown(pag_mount(pag))) {
> bool ok = true;
>
> - ok &= pag->pagf_freeblks == be32_to_cpu(agf->agf_freeblks);
> ok &= pag->pagf_freeblks == be32_to_cpu(agf->agf_freeblks);
> ok &= pag->pagf_btreeblks == be32_to_cpu(agf->agf_btreeblks);
> ok &= pag->pagf_flcount == be32_to_cpu(agf->agf_flcount);
> diff --git a/fs/xfs/libxfs/xfs_ondisk.h b/fs/xfs/libxfs/xfs_ondisk.h
> index 23cde1248f01..ae16b1bc2bbe 100644
> --- a/fs/xfs/libxfs/xfs_ondisk.h
> +++ b/fs/xfs/libxfs/xfs_ondisk.h
> @@ -305,7 +305,6 @@ xfs_check_ondisk_structs(void)
> XFS_CHECK_STRUCT_SIZE(struct getbmapx, 48);
> XFS_CHECK_STRUCT_SIZE(struct xfs_attrlist_cursor, 16);
> XFS_CHECK_STRUCT_SIZE(struct xfs_attrlist, 8);
> - XFS_CHECK_STRUCT_SIZE(struct xfs_attrlist, 8);
> XFS_CHECK_STRUCT_SIZE(struct xfs_attrlist_ent, 4);
> XFS_CHECK_STRUCT_SIZE(struct xfs_ag_geometry, 128);
> XFS_CHECK_STRUCT_SIZE(struct xfs_rtgroup_geometry, 128);
> diff --git a/fs/xfs/libxfs/xfs_rtgroup.h b/fs/xfs/libxfs/xfs_rtgroup.h
> index fca2eb74908c..e505be68462b 100644
> --- a/fs/xfs/libxfs/xfs_rtgroup.h
> +++ b/fs/xfs/libxfs/xfs_rtgroup.h
> @@ -328,8 +328,6 @@ int xfs_rtginode_create(struct xfs_rtgroup *rtg, enum xfs_rtg_inodes type,
> bool init);
> void xfs_rtginode_irele(struct xfs_inode **ipp);
>
> -void xfs_rtginode_irele(struct xfs_inode **ipp);
> -
> static inline const char *xfs_rtginode_path(xfs_rgnumber_t rgno,
> enum xfs_rtg_inodes type)
> {
> --
> 2.53.0
>