mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] xfs: remove a few duplicated lines
@ 2026-11-26 12:22 Zizhi Wo
  2026-11-26 13:26 ` Carlos Maiolino
  0 siblings, 1 reply; 3+ messages in thread
From: Zizhi Wo @ 2026-11-26 12:22 UTC (permalink / raw)
  To: cem, dgc, djwong, hch, linux-xfs
  Cc: linux-kernel, yangerkun, chengzhihao1, wozizhi

From: Zizhi Wo <wozizhi@huawei.com>

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.

Signed-off-by: Zizhi Wo <wozizhi@huawei.com>
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-26 13:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-26 12:22 [PATCH] xfs: remove a few duplicated lines Zizhi Wo
2026-11-26 13:26 ` Carlos Maiolino
2026-11-26 13:43   ` Zizhi Wo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®