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

xfs: use XFS_B_TO_FSB in xfs_ioctl_setattr

Clean up xfs_ioctl_setattr a bit by using XFS_B_TO_FSB.
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 4800887b
...@@ -1520,12 +1520,12 @@ xfs_ioctl_setattr( ...@@ -1520,12 +1520,12 @@ xfs_ioctl_setattr(
* are set on the inode then unconditionally clear the extent size hint. * are set on the inode then unconditionally clear the extent size hint.
*/ */
if (ip->i_d.di_flags & (XFS_DIFLAG_EXTSIZE | XFS_DIFLAG_EXTSZINHERIT)) if (ip->i_d.di_flags & (XFS_DIFLAG_EXTSIZE | XFS_DIFLAG_EXTSZINHERIT))
ip->i_extsize = fa->fsx_extsize >> mp->m_sb.sb_blocklog; ip->i_extsize = XFS_B_TO_FSB(mp, fa->fsx_extsize);
else else
ip->i_extsize = 0; ip->i_extsize = 0;
if (xfs_sb_version_has_v3inode(&mp->m_sb) && if (xfs_sb_version_has_v3inode(&mp->m_sb) &&
(ip->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE)) (ip->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE))
ip->i_cowextsize = fa->fsx_cowextsize >> mp->m_sb.sb_blocklog; ip->i_cowextsize = XFS_B_TO_FSB(mp, fa->fsx_cowextsize);
else else
ip->i_cowextsize = 0; ip->i_cowextsize = 0;
......
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