summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_ioctl.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-03-29 11:11:45 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-04-07 14:37:05 -0700
commit3e09ab8fdc4d4c9d0afee7a63a3b39e5ade3c863 (patch)
tree1c3dff6cf5721b9fd8f28ee70e3205dbe3789a99 /fs/xfs/xfs_ioctl.c
parentdb07349da2f564742c0f23528691991e641e315e (diff)
xfs: move the di_flags2 field to struct xfs_inode
In preparation of removing the historic icinode struct, move the flags2 field into the containing xfs_inode structure. 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.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index cf54cf58e2db..5a54a096cdd1 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1123,7 +1123,7 @@ xfs_fill_fsxattr(
simple_fill_fsxattr(fa, xfs_ip2xflags(ip));
fa->fsx_extsize = XFS_FSB_TO_B(mp, ip->i_extsize);
- if (ip->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE)
+ if (ip->i_diflags2 & XFS_DIFLAG2_COWEXTSIZE)
fa->fsx_cowextsize = XFS_FSB_TO_B(mp, ip->i_cowextsize);
fa->fsx_projid = ip->i_projid;
if (ifp && (ifp->if_flags & XFS_IFEXTENTS))
@@ -1197,8 +1197,8 @@ xfs_flags2diflags2(
unsigned int xflags)
{
uint64_t di_flags2 =
- (ip->i_d.di_flags2 & (XFS_DIFLAG2_REFLINK |
- XFS_DIFLAG2_BIGTIME));
+ (ip->i_diflags2 & (XFS_DIFLAG2_REFLINK |
+ XFS_DIFLAG2_BIGTIME));
if (xflags & FS_XFLAG_DAX)
di_flags2 |= XFS_DIFLAG2_DAX;
@@ -1215,7 +1215,7 @@ xfs_ioctl_setattr_xflags(
struct fsxattr *fa)
{
struct xfs_mount *mp = ip->i_mount;
- uint64_t di_flags2;
+ uint64_t i_flags2;
/* Can't change realtime flag if any extents are allocated. */
if ((ip->i_df.if_nextents || ip->i_delayed_blks) &&
@@ -1231,19 +1231,19 @@ xfs_ioctl_setattr_xflags(
/* Clear reflink if we are actually able to set the rt flag. */
if ((fa->fsx_xflags & FS_XFLAG_REALTIME) && xfs_is_reflink_inode(ip))
- ip->i_d.di_flags2 &= ~XFS_DIFLAG2_REFLINK;
+ ip->i_diflags2 &= ~XFS_DIFLAG2_REFLINK;
/* Don't allow us to set DAX mode for a reflinked file for now. */
if ((fa->fsx_xflags & FS_XFLAG_DAX) && xfs_is_reflink_inode(ip))
return -EINVAL;
/* diflags2 only valid for v3 inodes. */
- di_flags2 = xfs_flags2diflags2(ip, fa->fsx_xflags);
- if (di_flags2 && !xfs_sb_version_has_v3inode(&mp->m_sb))
+ i_flags2 = xfs_flags2diflags2(ip, fa->fsx_xflags);
+ if (i_flags2 && !xfs_sb_version_has_v3inode(&mp->m_sb))
return -EINVAL;
ip->i_diflags = xfs_flags2diflags(ip, fa->fsx_xflags);
- ip->i_d.di_flags2 = di_flags2;
+ ip->i_diflags2 = i_flags2;
xfs_diflags_to_iflags(ip, false);
xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_CHG);
@@ -1268,9 +1268,9 @@ xfs_ioctl_setattr_prepare_dax(
return;
if (((fa->fsx_xflags & FS_XFLAG_DAX) &&
- !(ip->i_d.di_flags2 & XFS_DIFLAG2_DAX)) ||
+ !(ip->i_diflags2 & XFS_DIFLAG2_DAX)) ||
(!(fa->fsx_xflags & FS_XFLAG_DAX) &&
- (ip->i_d.di_flags2 & XFS_DIFLAG2_DAX)))
+ (ip->i_diflags2 & XFS_DIFLAG2_DAX)))
d_mark_dontcache(inode);
}
@@ -1526,7 +1526,7 @@ xfs_ioctl_setattr(
ip->i_extsize = 0;
if (xfs_sb_version_has_v3inode(&mp->m_sb)) {
- if (ip->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE)
+ if (ip->i_diflags2 & XFS_DIFLAG2_COWEXTSIZE)
ip->i_cowextsize = XFS_B_TO_FSB(mp, fa->fsx_cowextsize);
else
ip->i_cowextsize = 0;
@@ -1575,7 +1575,7 @@ xfs_ioc_getxflags(
{
unsigned int flags;
- flags = xfs_di2lxflags(ip->i_diflags, ip->i_d.di_flags2);
+ flags = xfs_di2lxflags(ip->i_diflags, ip->i_diflags2);
if (copy_to_user(arg, &flags, sizeof(flags)))
return -EFAULT;
return 0;