summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_ioctl.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-03-29 21:11:42 +0300
committerDarrick J. Wong <djwong@kernel.org>2021-04-08 00:37:04 +0300
commit4800887b457460a0a1edbf7d657be47d4d8758cd (patch)
treeae17aafd515bb9a32f6adbf2bd37ae5f06bfb7d0 /fs/xfs/xfs_ioctl.c
parent965e0a1ad273ba61a8040220ef8ec09c9d065875 (diff)
downloadlinux-4800887b457460a0a1edbf7d657be47d4d8758cd.tar.xz
xfs: cleanup xfs_fill_fsxattr
Add a local xfs_mount variable, and use the XFS_FSB_TO_B helper. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
-rw-r--r--fs/xfs/xfs_ioctl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index e45bce9b1108..d589ecef4ec7 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -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);