On Wed, Mar 24, 2021 at 03:21:25PM +0100, Christoph Hellwig wrote: > Add a local xfs_mount variable, and use the XFS_FSB_TO_B helper. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> Yay! Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx> --D > --- > fs/xfs/xfs_ioctl.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c > index 3405a5f5bacfda..2b32dd4e14890b 100644 > --- a/fs/xfs/xfs_ioctl.c > +++ b/fs/xfs/xfs_ioctl.c > @@ -1117,15 +1117,14 @@ xfs_fill_fsxattr( > bool attr, > struct fsxattr *fa) > { > + struct xfs_mount *mp = ip->i_mount; > struct xfs_ifork *ifp = attr ? ip->i_afp : &ip->i_df; > > simple_fill_fsxattr(fa, xfs_ip2xflags(ip)); > - fa->fsx_extsize = ip->i_extsize << ip->i_mount->m_sb.sb_blocklog; > - if (xfs_sb_version_has_v3inode(&ip->i_mount->m_sb) && > - (ip->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE)) { > - fa->fsx_cowextsize = > - ip->i_cowextsize << ip->i_mount->m_sb.sb_blocklog; > - } > + fa->fsx_extsize = XFS_FSB_TO_B(mp, ip->i_extsize); > + if (xfs_sb_version_has_v3inode(&mp->m_sb) && > + (ip->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE)) > + fa->fsx_cowextsize = XFS_FSB_TO_B(mp, ip->i_cowextsize); > fa->fsx_projid = ip->i_projid; > if (ifp && (ifp->if_flags & XFS_IFEXTENTS)) > fa->fsx_nextents = xfs_iext_count(ifp); > -- > 2.30.1 >