[ Sasha's backport helper bot ] Hi, The upstream commit SHA1 provided is correct: c421df0b19430417a04f68919fc3d1943d20ac04 WARNING: Author mismatch between patch and upstream commit: Backport author: Leah Rumancik<leah.rumancik@xxxxxxxxx> Commit author: Christoph Hellwig<hch@xxxxxx> Status in newer kernel trees: 6.13.y | Present (exact SHA1) 6.12.y | Present (exact SHA1) 6.6.y | Present (different SHA1: d7d5ed65364c) 6.1.y | Present (different SHA1: a426d90bf5d7) Note: The patch differs from the upstream commit: --- 1: c421df0b19430 ! 1: 3bbebf3ef4d3f xfs: clean up FS_XFLAG_REALTIME handling in xfs_ioctl_setattr_xflags @@ Metadata ## Commit message ## xfs: clean up FS_XFLAG_REALTIME handling in xfs_ioctl_setattr_xflags + [ Upstream commit c421df0b19430417a04f68919fc3d1943d20ac04 ] + Introduce a local boolean variable if FS_XFLAG_REALTIME to make the checks for it more obvious, and de-densify a few of the conditionals using it to make them more readable while at it. @@ Commit message Link: https://lore.kernel.org/r/20231025141020.192413-4-hch@xxxxxx Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx> Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> + Signed-off-by: Leah Rumancik <leah.rumancik@xxxxxxxxx> ## fs/xfs/xfs_ioctl.c ## @@ fs/xfs/xfs_ioctl.c: xfs_ioctl_setattr_xflags( @@ fs/xfs/xfs_ioctl.c: xfs_ioctl_setattr_xflags( + if (rtflag) { + /* If realtime flag is set then must have realtime device */ if (mp->m_sb.sb_rblocks == 0 || mp->m_sb.sb_rextsize == 0 || - xfs_extlen_to_rtxmod(mp, ip->i_extsize)) + (ip->i_extsize % mp->m_sb.sb_rextsize)) return -EINVAL; - } @@ fs/xfs/xfs_ioctl.c: xfs_ioctl_setattr_xflags( + ip->i_diflags2 &= ~XFS_DIFLAG2_REFLINK; + } - /* diflags2 only valid for v3 inodes. */ - i_flags2 = xfs_flags2diflags2(ip, fa->fsx_xflags); + /* Don't allow us to set DAX mode for a reflinked file for now. */ + if ((fa->fsx_xflags & FS_XFLAG_DAX) && xfs_is_reflink_inode(ip)) --- Results of testing on various branches: | Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.1.y | Success | Success |