mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-01 08:04:22 +08:00
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>
This commit is contained in:
parent
965e0a1ad2
commit
4800887b45
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user