Commit 4800887b authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

xfs: cleanup xfs_fill_fsxattr

Add a local xfs_mount variable, and use the XFS_FSB_TO_B helper.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
parent 965e0a1a
......@@ -1117,11 +1117,13 @@ 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;
fa->fsx_cowextsize = ip->i_cowextsize << ip->i_mount->m_sb.sb_blocklog;
fa->fsx_extsize = XFS_FSB_TO_B(mp, ip->i_extsize);
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment