提交 4800887b 编写于 作者: C Christoph Hellwig 提交者: 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: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册