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

xfs: move the di_flags field to struct xfs_inode

In preparation of removing the historic icinode struct, move the flags
field into the containing xfs_inode structure.
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 7821ea30
...@@ -183,7 +183,7 @@ xfs_bmbt_update_cursor( ...@@ -183,7 +183,7 @@ xfs_bmbt_update_cursor(
struct xfs_btree_cur *dst) struct xfs_btree_cur *dst)
{ {
ASSERT((dst->bc_tp->t_firstblock != NULLFSBLOCK) || ASSERT((dst->bc_tp->t_firstblock != NULLFSBLOCK) ||
(dst->bc_ino.ip->i_d.di_flags & XFS_DIFLAG_REALTIME)); (dst->bc_ino.ip->i_diflags & XFS_DIFLAG_REALTIME));
dst->bc_ino.allocated += src->bc_ino.allocated; dst->bc_ino.allocated += src->bc_ino.allocated;
dst->bc_tp->t_firstblock = src->bc_tp->t_firstblock; dst->bc_tp->t_firstblock = src->bc_tp->t_firstblock;
......
...@@ -231,7 +231,7 @@ xfs_inode_from_disk( ...@@ -231,7 +231,7 @@ xfs_inode_from_disk(
ip->i_nblocks = be64_to_cpu(from->di_nblocks); ip->i_nblocks = be64_to_cpu(from->di_nblocks);
ip->i_extsize = be32_to_cpu(from->di_extsize); ip->i_extsize = be32_to_cpu(from->di_extsize);
ip->i_forkoff = from->di_forkoff; ip->i_forkoff = from->di_forkoff;
to->di_flags = be16_to_cpu(from->di_flags); ip->i_diflags = be16_to_cpu(from->di_flags);
if (from->di_dmevmask || from->di_dmstate) if (from->di_dmevmask || from->di_dmstate)
xfs_iflags_set(ip, XFS_IPRESERVE_DM_FIELDS); xfs_iflags_set(ip, XFS_IPRESERVE_DM_FIELDS);
...@@ -313,7 +313,7 @@ xfs_inode_to_disk( ...@@ -313,7 +313,7 @@ xfs_inode_to_disk(
to->di_anextents = cpu_to_be16(xfs_ifork_nextents(ip->i_afp)); to->di_anextents = cpu_to_be16(xfs_ifork_nextents(ip->i_afp));
to->di_forkoff = ip->i_forkoff; to->di_forkoff = ip->i_forkoff;
to->di_aformat = xfs_ifork_format(ip->i_afp); to->di_aformat = xfs_ifork_format(ip->i_afp);
to->di_flags = cpu_to_be16(from->di_flags); to->di_flags = cpu_to_be16(ip->i_diflags);
if (xfs_sb_version_has_v3inode(&ip->i_mount->m_sb)) { if (xfs_sb_version_has_v3inode(&ip->i_mount->m_sb)) {
to->di_version = 3; to->di_version = 3;
......
...@@ -16,8 +16,6 @@ struct xfs_dinode; ...@@ -16,8 +16,6 @@ struct xfs_dinode;
* format specific structures at the appropriate time. * format specific structures at the appropriate time.
*/ */
struct xfs_icdinode { struct xfs_icdinode {
uint16_t di_flags; /* random flags, XFS_DIFLAG_... */
uint64_t di_flags2; /* more random flags */ uint64_t di_flags2; /* more random flags */
struct timespec64 di_crtime; /* time created */ struct timespec64 di_crtime; /* time created */
......
...@@ -997,8 +997,8 @@ xfs_rtfree_extent( ...@@ -997,8 +997,8 @@ xfs_rtfree_extent(
*/ */
if (tp->t_frextents_delta + mp->m_sb.sb_frextents == if (tp->t_frextents_delta + mp->m_sb.sb_frextents ==
mp->m_sb.sb_rextents) { mp->m_sb.sb_rextents) {
if (!(mp->m_rbmip->i_d.di_flags & XFS_DIFLAG_NEWRTBM)) if (!(mp->m_rbmip->i_diflags & XFS_DIFLAG_NEWRTBM))
mp->m_rbmip->i_d.di_flags |= XFS_DIFLAG_NEWRTBM; mp->m_rbmip->i_diflags |= XFS_DIFLAG_NEWRTBM;
*(uint64_t *)&VFS_I(mp->m_rbmip)->i_atime = 0; *(uint64_t *)&VFS_I(mp->m_rbmip)->i_atime = 0;
xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE); xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE);
} }
......
...@@ -818,7 +818,7 @@ xchk_metadata_inode_forks( ...@@ -818,7 +818,7 @@ xchk_metadata_inode_forks(
return 0; return 0;
/* Metadata inodes don't live on the rt device. */ /* Metadata inodes don't live on the rt device. */
if (sc->ip->i_d.di_flags & XFS_DIFLAG_REALTIME) { if (sc->ip->i_diflags & XFS_DIFLAG_REALTIME) {
xchk_ino_set_corrupt(sc, sc->ip->i_ino); xchk_ino_set_corrupt(sc, sc->ip->i_ino);
return 0; return 0;
} }
......
...@@ -439,7 +439,7 @@ xfs_getbmap( ...@@ -439,7 +439,7 @@ xfs_getbmap(
} }
if (xfs_get_extsz_hint(ip) || if (xfs_get_extsz_hint(ip) ||
(ip->i_d.di_flags & (ip->i_diflags &
(XFS_DIFLAG_PREALLOC | XFS_DIFLAG_APPEND))) (XFS_DIFLAG_PREALLOC | XFS_DIFLAG_APPEND)))
max_len = mp->m_super->s_maxbytes; max_len = mp->m_super->s_maxbytes;
else else
...@@ -620,7 +620,7 @@ xfs_can_free_eofblocks(struct xfs_inode *ip, bool force) ...@@ -620,7 +620,7 @@ xfs_can_free_eofblocks(struct xfs_inode *ip, bool force)
* Do not free real preallocated or append-only files unless the file * Do not free real preallocated or append-only files unless the file
* has delalloc blocks and we are forced to remove them. * has delalloc blocks and we are forced to remove them.
*/ */
if (ip->i_d.di_flags & (XFS_DIFLAG_PREALLOC | XFS_DIFLAG_APPEND)) if (ip->i_diflags & (XFS_DIFLAG_PREALLOC | XFS_DIFLAG_APPEND))
if (!force || ip->i_delayed_blks == 0) if (!force || ip->i_delayed_blks == 0)
return false; return false;
......
...@@ -90,9 +90,9 @@ xfs_update_prealloc_flags( ...@@ -90,9 +90,9 @@ xfs_update_prealloc_flags(
} }
if (flags & XFS_PREALLOC_SET) if (flags & XFS_PREALLOC_SET)
ip->i_d.di_flags |= XFS_DIFLAG_PREALLOC; ip->i_diflags |= XFS_DIFLAG_PREALLOC;
if (flags & XFS_PREALLOC_CLEAR) if (flags & XFS_PREALLOC_CLEAR)
ip->i_d.di_flags &= ~XFS_DIFLAG_PREALLOC; ip->i_diflags &= ~XFS_DIFLAG_PREALLOC;
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
if (flags & XFS_PREALLOC_SYNC) if (flags & XFS_PREALLOC_SYNC)
......
...@@ -22,7 +22,7 @@ xfs_inode_is_filestream( ...@@ -22,7 +22,7 @@ xfs_inode_is_filestream(
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
return (ip->i_mount->m_flags & XFS_MOUNT_FILESTREAMS) || return (ip->i_mount->m_flags & XFS_MOUNT_FILESTREAMS) ||
(ip->i_d.di_flags & XFS_DIFLAG_FILESTREAM); (ip->i_diflags & XFS_DIFLAG_FILESTREAM);
} }
#endif /* __XFS_FILESTREAM_H__ */ #endif /* __XFS_FILESTREAM_H__ */
...@@ -60,7 +60,7 @@ xfs_get_extsz_hint( ...@@ -60,7 +60,7 @@ xfs_get_extsz_hint(
*/ */
if (xfs_is_always_cow_inode(ip)) if (xfs_is_always_cow_inode(ip))
return 0; return 0;
if ((ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) && ip->i_extsize) if ((ip->i_diflags & XFS_DIFLAG_EXTSIZE) && ip->i_extsize)
return ip->i_extsize; return ip->i_extsize;
if (XFS_IS_REALTIME_INODE(ip)) if (XFS_IS_REALTIME_INODE(ip))
return ip->i_mount->m_sb.sb_rextsize; return ip->i_mount->m_sb.sb_rextsize;
...@@ -656,7 +656,7 @@ xfs_ip2xflags( ...@@ -656,7 +656,7 @@ xfs_ip2xflags(
{ {
struct xfs_icdinode *dic = &ip->i_d; struct xfs_icdinode *dic = &ip->i_d;
return _xfs_dic2xflags(dic->di_flags, dic->di_flags2, XFS_IFORK_Q(ip)); return _xfs_dic2xflags(ip->i_diflags, dic->di_flags2, XFS_IFORK_Q(ip));
} }
/* /*
...@@ -708,42 +708,42 @@ xfs_inode_inherit_flags( ...@@ -708,42 +708,42 @@ xfs_inode_inherit_flags(
umode_t mode = VFS_I(ip)->i_mode; umode_t mode = VFS_I(ip)->i_mode;
if (S_ISDIR(mode)) { if (S_ISDIR(mode)) {
if (pip->i_d.di_flags & XFS_DIFLAG_RTINHERIT) if (pip->i_diflags & XFS_DIFLAG_RTINHERIT)
di_flags |= XFS_DIFLAG_RTINHERIT; di_flags |= XFS_DIFLAG_RTINHERIT;
if (pip->i_d.di_flags & XFS_DIFLAG_EXTSZINHERIT) { if (pip->i_diflags & XFS_DIFLAG_EXTSZINHERIT) {
di_flags |= XFS_DIFLAG_EXTSZINHERIT; di_flags |= XFS_DIFLAG_EXTSZINHERIT;
ip->i_extsize = pip->i_extsize; ip->i_extsize = pip->i_extsize;
} }
if (pip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) if (pip->i_diflags & XFS_DIFLAG_PROJINHERIT)
di_flags |= XFS_DIFLAG_PROJINHERIT; di_flags |= XFS_DIFLAG_PROJINHERIT;
} else if (S_ISREG(mode)) { } else if (S_ISREG(mode)) {
if ((pip->i_d.di_flags & XFS_DIFLAG_RTINHERIT) && if ((pip->i_diflags & XFS_DIFLAG_RTINHERIT) &&
xfs_sb_version_hasrealtime(&ip->i_mount->m_sb)) xfs_sb_version_hasrealtime(&ip->i_mount->m_sb))
di_flags |= XFS_DIFLAG_REALTIME; di_flags |= XFS_DIFLAG_REALTIME;
if (pip->i_d.di_flags & XFS_DIFLAG_EXTSZINHERIT) { if (pip->i_diflags & XFS_DIFLAG_EXTSZINHERIT) {
di_flags |= XFS_DIFLAG_EXTSIZE; di_flags |= XFS_DIFLAG_EXTSIZE;
ip->i_extsize = pip->i_extsize; ip->i_extsize = pip->i_extsize;
} }
} }
if ((pip->i_d.di_flags & XFS_DIFLAG_NOATIME) && if ((pip->i_diflags & XFS_DIFLAG_NOATIME) &&
xfs_inherit_noatime) xfs_inherit_noatime)
di_flags |= XFS_DIFLAG_NOATIME; di_flags |= XFS_DIFLAG_NOATIME;
if ((pip->i_d.di_flags & XFS_DIFLAG_NODUMP) && if ((pip->i_diflags & XFS_DIFLAG_NODUMP) &&
xfs_inherit_nodump) xfs_inherit_nodump)
di_flags |= XFS_DIFLAG_NODUMP; di_flags |= XFS_DIFLAG_NODUMP;
if ((pip->i_d.di_flags & XFS_DIFLAG_SYNC) && if ((pip->i_diflags & XFS_DIFLAG_SYNC) &&
xfs_inherit_sync) xfs_inherit_sync)
di_flags |= XFS_DIFLAG_SYNC; di_flags |= XFS_DIFLAG_SYNC;
if ((pip->i_d.di_flags & XFS_DIFLAG_NOSYMLINKS) && if ((pip->i_diflags & XFS_DIFLAG_NOSYMLINKS) &&
xfs_inherit_nosymlinks) xfs_inherit_nosymlinks)
di_flags |= XFS_DIFLAG_NOSYMLINKS; di_flags |= XFS_DIFLAG_NOSYMLINKS;
if ((pip->i_d.di_flags & XFS_DIFLAG_NODEFRAG) && if ((pip->i_diflags & XFS_DIFLAG_NODEFRAG) &&
xfs_inherit_nodefrag) xfs_inherit_nodefrag)
di_flags |= XFS_DIFLAG_NODEFRAG; di_flags |= XFS_DIFLAG_NODEFRAG;
if (pip->i_d.di_flags & XFS_DIFLAG_FILESTREAM) if (pip->i_diflags & XFS_DIFLAG_FILESTREAM)
di_flags |= XFS_DIFLAG_FILESTREAM; di_flags |= XFS_DIFLAG_FILESTREAM;
ip->i_d.di_flags |= di_flags; ip->i_diflags |= di_flags;
} }
/* Propagate di_flags2 from a parent inode to a child inode. */ /* Propagate di_flags2 from a parent inode to a child inode. */
...@@ -840,7 +840,7 @@ xfs_init_new_inode( ...@@ -840,7 +840,7 @@ xfs_init_new_inode(
inode->i_ctime = tv; inode->i_ctime = tv;
ip->i_extsize = 0; ip->i_extsize = 0;
ip->i_d.di_flags = 0; ip->i_diflags = 0;
if (xfs_sb_version_has_v3inode(&mp->m_sb)) { if (xfs_sb_version_has_v3inode(&mp->m_sb)) {
inode_set_iversion(inode, 1); inode_set_iversion(inode, 1);
...@@ -860,7 +860,7 @@ xfs_init_new_inode( ...@@ -860,7 +860,7 @@ xfs_init_new_inode(
break; break;
case S_IFREG: case S_IFREG:
case S_IFDIR: case S_IFDIR:
if (pip && (pip->i_d.di_flags & XFS_DIFLAG_ANY)) if (pip && (pip->i_diflags & XFS_DIFLAG_ANY))
xfs_inode_inherit_flags(ip, pip); xfs_inode_inherit_flags(ip, pip);
if (pip && (pip->i_d.di_flags2 & XFS_DIFLAG2_ANY)) if (pip && (pip->i_d.di_flags2 & XFS_DIFLAG2_ANY))
xfs_inode_inherit_flags2(ip, pip); xfs_inode_inherit_flags2(ip, pip);
...@@ -1287,7 +1287,7 @@ xfs_link( ...@@ -1287,7 +1287,7 @@ xfs_link(
* creation in our tree when the project IDs are the same; else * creation in our tree when the project IDs are the same; else
* the tree quota mechanism could be circumvented. * the tree quota mechanism could be circumvented.
*/ */
if (unlikely((tdp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) && if (unlikely((tdp->i_diflags & XFS_DIFLAG_PROJINHERIT) &&
tdp->i_projid != sip->i_projid)) { tdp->i_projid != sip->i_projid)) {
error = -EXDEV; error = -EXDEV;
goto error_return; goto error_return;
...@@ -2611,7 +2611,7 @@ xfs_ifree( ...@@ -2611,7 +2611,7 @@ xfs_ifree(
} }
VFS_I(ip)->i_mode = 0; /* mark incore inode as free */ VFS_I(ip)->i_mode = 0; /* mark incore inode as free */
ip->i_d.di_flags = 0; ip->i_diflags = 0;
ip->i_d.di_flags2 = ip->i_mount->m_ino_geo.new_diflags2; ip->i_d.di_flags2 = ip->i_mount->m_ino_geo.new_diflags2;
ip->i_forkoff = 0; /* mark the attr fork not in use */ ip->i_forkoff = 0; /* mark the attr fork not in use */
ip->i_df.if_format = XFS_DINODE_FMT_EXTENTS; ip->i_df.if_format = XFS_DINODE_FMT_EXTENTS;
...@@ -3125,7 +3125,7 @@ xfs_rename( ...@@ -3125,7 +3125,7 @@ xfs_rename(
* into our tree when the project IDs are the same; else the * into our tree when the project IDs are the same; else the
* tree quota mechanism would be circumvented. * tree quota mechanism would be circumvented.
*/ */
if (unlikely((target_dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) && if (unlikely((target_dp->i_diflags & XFS_DIFLAG_PROJINHERIT) &&
target_dp->i_projid != src_ip->i_projid)) { target_dp->i_projid != src_ip->i_projid)) {
error = -EXDEV; error = -EXDEV;
goto out_trans_cancel; goto out_trans_cancel;
......
...@@ -64,6 +64,7 @@ typedef struct xfs_inode { ...@@ -64,6 +64,7 @@ typedef struct xfs_inode {
uint16_t i_flushiter; /* incremented on flush */ uint16_t i_flushiter; /* incremented on flush */
}; };
uint8_t i_forkoff; /* attr fork offset >> 3 */ uint8_t i_forkoff; /* attr fork offset >> 3 */
uint16_t i_diflags; /* XFS_DIFLAG_... */
struct xfs_icdinode i_d; /* most of ondisk inode */ struct xfs_icdinode i_d; /* most of ondisk inode */
...@@ -184,7 +185,7 @@ xfs_iflags_test_and_set(xfs_inode_t *ip, unsigned short flags) ...@@ -184,7 +185,7 @@ xfs_iflags_test_and_set(xfs_inode_t *ip, unsigned short flags)
static inline prid_t static inline prid_t
xfs_get_initial_prid(struct xfs_inode *dp) xfs_get_initial_prid(struct xfs_inode *dp)
{ {
if (dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) if (dp->i_diflags & XFS_DIFLAG_PROJINHERIT)
return dp->i_projid; return dp->i_projid;
return XFS_PROJID_DEFAULT; return XFS_PROJID_DEFAULT;
......
...@@ -376,7 +376,7 @@ xfs_inode_to_log_dinode( ...@@ -376,7 +376,7 @@ xfs_inode_to_log_dinode(
to->di_anextents = xfs_ifork_nextents(ip->i_afp); to->di_anextents = xfs_ifork_nextents(ip->i_afp);
to->di_forkoff = ip->i_forkoff; to->di_forkoff = ip->i_forkoff;
to->di_aformat = xfs_ifork_format(ip->i_afp); to->di_aformat = xfs_ifork_format(ip->i_afp);
to->di_flags = from->di_flags; to->di_flags = ip->i_diflags;
xfs_copy_dm_fields_to_log_dinode(ip, to); xfs_copy_dm_fields_to_log_dinode(ip, to);
......
...@@ -1156,7 +1156,7 @@ xfs_flags2diflags( ...@@ -1156,7 +1156,7 @@ xfs_flags2diflags(
{ {
/* can't set PREALLOC this way, just preserve it */ /* can't set PREALLOC this way, just preserve it */
uint16_t di_flags = uint16_t di_flags =
(ip->i_d.di_flags & XFS_DIFLAG_PREALLOC); (ip->i_diflags & XFS_DIFLAG_PREALLOC);
if (xflags & FS_XFLAG_IMMUTABLE) if (xflags & FS_XFLAG_IMMUTABLE)
di_flags |= XFS_DIFLAG_IMMUTABLE; di_flags |= XFS_DIFLAG_IMMUTABLE;
...@@ -1242,7 +1242,7 @@ xfs_ioctl_setattr_xflags( ...@@ -1242,7 +1242,7 @@ xfs_ioctl_setattr_xflags(
if (di_flags2 && !xfs_sb_version_has_v3inode(&mp->m_sb)) if (di_flags2 && !xfs_sb_version_has_v3inode(&mp->m_sb))
return -EINVAL; return -EINVAL;
ip->i_d.di_flags = xfs_flags2diflags(ip, fa->fsx_xflags); ip->i_diflags = xfs_flags2diflags(ip, fa->fsx_xflags);
ip->i_d.di_flags2 = di_flags2; ip->i_d.di_flags2 = di_flags2;
xfs_diflags_to_iflags(ip, false); xfs_diflags_to_iflags(ip, false);
...@@ -1520,7 +1520,7 @@ xfs_ioctl_setattr( ...@@ -1520,7 +1520,7 @@ xfs_ioctl_setattr(
* extent size hint should be set on the inode. If no extent size flags * extent size hint should be set on the inode. If no extent size flags
* 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_diflags & (XFS_DIFLAG_EXTSIZE | XFS_DIFLAG_EXTSZINHERIT))
ip->i_extsize = XFS_B_TO_FSB(mp, fa->fsx_extsize); ip->i_extsize = XFS_B_TO_FSB(mp, fa->fsx_extsize);
else else
ip->i_extsize = 0; ip->i_extsize = 0;
...@@ -1575,7 +1575,7 @@ xfs_ioc_getxflags( ...@@ -1575,7 +1575,7 @@ xfs_ioc_getxflags(
{ {
unsigned int flags; unsigned int flags;
flags = xfs_di2lxflags(ip->i_d.di_flags, ip->i_d.di_flags2); flags = xfs_di2lxflags(ip->i_diflags, ip->i_d.di_flags2);
if (copy_to_user(arg, &flags, sizeof(flags))) if (copy_to_user(arg, &flags, sizeof(flags)))
return -EFAULT; return -EFAULT;
return 0; return 0;
......
...@@ -607,11 +607,11 @@ xfs_vn_getattr( ...@@ -607,11 +607,11 @@ xfs_vn_getattr(
* Note: If you add another clause to set an attribute flag, please * Note: If you add another clause to set an attribute flag, please
* update attributes_mask below. * update attributes_mask below.
*/ */
if (ip->i_d.di_flags & XFS_DIFLAG_IMMUTABLE) if (ip->i_diflags & XFS_DIFLAG_IMMUTABLE)
stat->attributes |= STATX_ATTR_IMMUTABLE; stat->attributes |= STATX_ATTR_IMMUTABLE;
if (ip->i_d.di_flags & XFS_DIFLAG_APPEND) if (ip->i_diflags & XFS_DIFLAG_APPEND)
stat->attributes |= STATX_ATTR_APPEND; stat->attributes |= STATX_ATTR_APPEND;
if (ip->i_d.di_flags & XFS_DIFLAG_NODUMP) if (ip->i_diflags & XFS_DIFLAG_NODUMP)
stat->attributes |= STATX_ATTR_NODUMP; stat->attributes |= STATX_ATTR_NODUMP;
stat->attributes_mask |= (STATX_ATTR_IMMUTABLE | stat->attributes_mask |= (STATX_ATTR_IMMUTABLE |
......
...@@ -233,7 +233,7 @@ int xfs_rw_bdev(struct block_device *bdev, sector_t sector, unsigned int count, ...@@ -233,7 +233,7 @@ int xfs_rw_bdev(struct block_device *bdev, sector_t sector, unsigned int count,
* configured realtime device. * configured realtime device.
*/ */
#define XFS_IS_REALTIME_INODE(ip) \ #define XFS_IS_REALTIME_INODE(ip) \
(((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) && \ (((ip)->i_diflags & XFS_DIFLAG_REALTIME) && \
(ip)->i_mount->m_rtdev_targp) (ip)->i_mount->m_rtdev_targp)
#define XFS_IS_REALTIME_MOUNT(mp) ((mp)->m_rtdev_targp ? 1 : 0) #define XFS_IS_REALTIME_MOUNT(mp) ((mp)->m_rtdev_targp ? 1 : 0)
#else #else
......
...@@ -1318,8 +1318,8 @@ xfs_rtpick_extent( ...@@ -1318,8 +1318,8 @@ xfs_rtpick_extent(
ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL)); ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL));
seqp = (uint64_t *)&VFS_I(mp->m_rbmip)->i_atime; seqp = (uint64_t *)&VFS_I(mp->m_rbmip)->i_atime;
if (!(mp->m_rbmip->i_d.di_flags & XFS_DIFLAG_NEWRTBM)) { if (!(mp->m_rbmip->i_diflags & XFS_DIFLAG_NEWRTBM)) {
mp->m_rbmip->i_d.di_flags |= XFS_DIFLAG_NEWRTBM; mp->m_rbmip->i_diflags |= XFS_DIFLAG_NEWRTBM;
*seqp = 0; *seqp = 0;
} }
seq = *seqp; seq = *seqp;
......
...@@ -834,13 +834,13 @@ xfs_fs_statfs( ...@@ -834,13 +834,13 @@ xfs_fs_statfs(
statp->f_ffree = max_t(int64_t, ffree, 0); statp->f_ffree = max_t(int64_t, ffree, 0);
if ((ip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) && if ((ip->i_diflags & XFS_DIFLAG_PROJINHERIT) &&
((mp->m_qflags & (XFS_PQUOTA_ACCT|XFS_PQUOTA_ENFD))) == ((mp->m_qflags & (XFS_PQUOTA_ACCT|XFS_PQUOTA_ENFD))) ==
(XFS_PQUOTA_ACCT|XFS_PQUOTA_ENFD)) (XFS_PQUOTA_ACCT|XFS_PQUOTA_ENFD))
xfs_qm_statvfs(ip, statp); xfs_qm_statvfs(ip, statp);
if (XFS_IS_REALTIME_MOUNT(mp) && if (XFS_IS_REALTIME_MOUNT(mp) &&
(ip->i_d.di_flags & (XFS_DIFLAG_RTINHERIT | XFS_DIFLAG_REALTIME))) { (ip->i_diflags & (XFS_DIFLAG_RTINHERIT | XFS_DIFLAG_REALTIME))) {
statp->f_blocks = sbp->sb_rblocks; statp->f_blocks = sbp->sb_rblocks;
statp->f_bavail = statp->f_bfree = statp->f_bavail = statp->f_bfree =
sbp->sb_frextents * sbp->sb_rextsize; sbp->sb_frextents * sbp->sb_rextsize;
......
...@@ -210,7 +210,7 @@ xfs_symlink( ...@@ -210,7 +210,7 @@ xfs_symlink(
/* /*
* Check whether the directory allows new symlinks or not. * Check whether the directory allows new symlinks or not.
*/ */
if (dp->i_d.di_flags & XFS_DIFLAG_NOSYMLINKS) { if (dp->i_diflags & XFS_DIFLAG_NOSYMLINKS) {
error = -EPERM; error = -EPERM;
goto out_trans_cancel; goto out_trans_cancel;
} }
......
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