Re: [PATCH V2] xfs: remove duplicated lines

From: Carlos Maiolino

Date: Mon Nov 30 2026 - 08:37:12 EST


On Mon, Nov 30, 2026 at 09:19:34PM +0800, Zizhi Wo wrote:
> Hi,
>
> 在 2026/11/30 20:52, Christoph Hellwig 写道:
> > On Thu, Nov 26, 2026 at 09:59:47PM +0800, Zizhi Wo wrote:
> > > From: Zizhi Wo <wozizhi@xxxxxxxxxx>
> > >
> > > Remove duplicated lines:
> > > - xfs_ondisk.h checks the size of struct xfs_attrlist twice.
> > > - xfs_rtgroup.h declares xfs_rtginode_irele() twice.
> >
> > These look entirely unrelated, why combine them into a patch?
>
> I squashed them together because when I sent a similar dead-code cleanup
> series earlier this year [1], Carlos suggested that trivial removals
> like these don't really need to be split per-file and could live in one
> patch. I took that as the preferred style for this kind of change.
>
> Carlos, do you still feel the same way here, or would you rather I split
> this into two patches in v3? I'm fine either way.
>
> [1] https://lore.kernel.org/all/aprh7OnJPCL-iIIK@xxxxxxxxxxxxxxxxxxxxxx/

Yes, that's on me. I don't see the point of removing dead code in
different patches unless there is a very good reason to do so.

This patch though has a slightly different goal than the series you
mentioned before though. This is not removing dead code but duplicated
code added by mistake. Which is not really dead codes as it's code
executed by the cpu (well, one hunk)...

But again, I particularly don't see a reason to split those in different
patches, unless Christoph thinks otherwise.

>
> >
> > > Fixes: 650b774cf944 ("xfs: add static size checks for ioctl UABI")
> > > Fixes: 6b08901a6e8f ("xfs: add realtime reverse map inode to metadata directory")
> >
> > and no, removing dead lines is not a fix in the Fixes: tag sense.
>
> Understood. I didn't add any fixtags in v1 since I considered this a
> pure cleanup, but Carlos asked me to add them during the v1 review [2],
> which is why they showed up in v2.
>
> Carlos, could you clarify how you'd like this handled going forward? I'm
> fine either way too...
>
> [2] https://lore.kernel.org/all/awgy2d_SbrvHtvkI@xxxxxxxxxxxxxxxxxxx/

Yes, that's on me too. I consider the duplicated lines a bug during the
implementation, but, perhaps my understanding of the Fixes: tag was
too literal, so leave it out as Christoph suggested.

If Christoph doesn't bother with both changes belonging to a single
patch, I can remove the Fixes: tag at the time I pull the patch. If he
prefers you to split it into two patches, then on next version you send
them without the Fixes:.

Cheers.

>
>
> Thanks,
> Zizhi Wo
>
>