···6767xfs_inode_hasattr(6868 struct xfs_inode *ip)6969{7070- if (!XFS_IFORK_Q(ip))7070+ if (!xfs_inode_has_attr_fork(ip))7171 return 0;7272 if (ip->i_af.if_format == XFS_DINODE_FMT_EXTENTS &&7373 ip->i_af.if_nextents == 0)···999999 * If the inode doesn't have an attribute fork, add one.10001000 * (inode must not be locked when we call this routine)10011001 */10021002- if (XFS_IFORK_Q(dp) == 0) {10021002+ if (xfs_inode_has_attr_fork(dp) == 0) {10031003 int sf_size = sizeof(struct xfs_attr_sf_hdr) +10041004 xfs_attr_sf_entsize_byname(args->namelen,10051005 args->valuelen);
+1-1
fs/xfs/libxfs/xfs_attr.h
···576576 * context, i_af is guaranteed to exist. Hence if the attr fork is577577 * null, we were called from a pure remove operation and so we are done.578578 */579579- if (!XFS_IFORK_Q(args->dp))579579+ if (!xfs_inode_has_attr_fork(args->dp))580580 return XFS_DAS_DONE;581581582582 args->op_flags |= XFS_DA_OP_ADDNAME;
+2-2
fs/xfs/libxfs/xfs_bmap.c
···10231023 int logflags; /* logging flags */10241024 int error; /* error return value */1025102510261026- ASSERT(XFS_IFORK_Q(ip) == 0);10261026+ ASSERT(xfs_inode_has_attr_fork(ip) == 0);1027102710281028 mp = ip->i_mount;10291029 ASSERT(!XFS_NOT_DQATTACHED(mp, ip));···10341034 rsvd, &tp);10351035 if (error)10361036 return error;10371037- if (XFS_IFORK_Q(ip))10371037+ if (xfs_inode_has_attr_fork(ip))10381038 goto trans_cancel;1039103910401040 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
+1-1
fs/xfs/libxfs/xfs_inode_fork.c
···717717 struct xfs_ifork *ifp = &ip->i_af;718718 xfs_failaddr_t fa;719719720720- if (!XFS_IFORK_Q(ip))720720+ if (!xfs_inode_has_attr_fork(ip))721721 fa = __this_address;722722 else723723 fa = xfs_attr_shortform_verify(ip);
···338338 ASSERT(! XFS_NOT_DQATTACHED(mp, dp));339339340340 xfs_ilock(dp, lock_mode);341341- if (!XFS_IFORK_Q(dp))341341+ if (!xfs_inode_has_attr_fork(dp))342342 goto out_destroy_fork;343343 xfs_iunlock(dp, lock_mode);344344···351351 lock_mode = XFS_ILOCK_EXCL;352352 xfs_ilock(dp, lock_mode);353353354354- if (!XFS_IFORK_Q(dp))354354+ if (!xfs_inode_has_attr_fork(dp))355355 goto out_cancel;356356357357 /*
+5-5
fs/xfs/xfs_bmap_util.c
···444444 xfs_ilock(ip, XFS_IOLOCK_SHARED);445445 switch (whichfork) {446446 case XFS_ATTR_FORK:447447- if (!XFS_IFORK_Q(ip))447447+ if (!xfs_inode_has_attr_fork(ip))448448 goto out_unlock_iolock;449449450450 max_len = 1LL << 32;···13201320 * extent format...13211321 */13221322 if (tifp->if_format == XFS_DINODE_FMT_BTREE) {13231323- if (XFS_IFORK_Q(ip) &&13231323+ if (xfs_inode_has_attr_fork(ip) &&13241324 XFS_BMAP_BMDR_SPACE(tifp->if_broot) > XFS_IFORK_BOFF(ip))13251325 return -EINVAL;13261326 if (tifp->if_nextents <= XFS_IFORK_MAXEXT(ip, XFS_DATA_FORK))···1329132913301330 /* Reciprocal target->temp btree format checks */13311331 if (ifp->if_format == XFS_DINODE_FMT_BTREE) {13321332- if (XFS_IFORK_Q(tip) &&13321332+ if (xfs_inode_has_attr_fork(tip) &&13331333 XFS_BMAP_BMDR_SPACE(ip->i_df.if_broot) > XFS_IFORK_BOFF(tip))13341334 return -EINVAL;13351335 if (ifp->if_nextents <= XFS_IFORK_MAXEXT(tip, XFS_DATA_FORK))···15061506 /*15071507 * Count the number of extended attribute blocks15081508 */15091509- if (XFS_IFORK_Q(ip) && ip->i_af.if_nextents > 0 &&15091509+ if (xfs_inode_has_attr_fork(ip) && ip->i_af.if_nextents > 0 &&15101510 ip->i_af.if_format != XFS_DINODE_FMT_LOCAL) {15111511 error = xfs_bmap_count_blocks(tp, ip, XFS_ATTR_FORK, &junk,15121512 &aforkblks);15131513 if (error)15141514 return error;15151515 }15161516- if (XFS_IFORK_Q(tip) && tip->i_af.if_nextents > 0 &&15161516+ if (xfs_inode_has_attr_fork(tip) && tip->i_af.if_nextents > 0 &&15171517 tip->i_af.if_format != XFS_DINODE_FMT_LOCAL) {15181518 error = xfs_bmap_count_blocks(tp, tip, XFS_ATTR_FORK, &junk,15191519 &taforkblks);
+5-5
fs/xfs/xfs_inode.c
···125125{126126 uint lock_mode = XFS_ILOCK_SHARED;127127128128- if (XFS_IFORK_Q(ip) && xfs_need_iread_extents(&ip->i_af))128128+ if (xfs_inode_has_attr_fork(ip) && xfs_need_iread_extents(&ip->i_af))129129 lock_mode = XFS_ILOCK_EXCL;130130 xfs_ilock(ip, lock_mode);131131 return lock_mode;···635635 flags |= FS_XFLAG_COWEXTSIZE;636636 }637637638638- if (XFS_IFORK_Q(ip))638638+ if (xfs_inode_has_attr_fork(ip))639639 flags |= FS_XFLAG_HASATTR;640640 return flags;641641}···17621762 * now. The code calls a routine that recursively deconstructs the17631763 * attribute fork. If also blows away the in-core attribute fork.17641764 */17651765- if (XFS_IFORK_Q(ip)) {17651765+ if (xfs_inode_has_attr_fork(ip)) {17661766 error = xfs_attr_inactive(ip);17671767 if (error)17681768 goto out;···35013501 if (ip->i_df.if_format == XFS_DINODE_FMT_LOCAL &&35023502 xfs_ifork_verify_local_data(ip))35033503 goto flush_out;35043504- if (XFS_IFORK_Q(ip) &&35043504+ if (xfs_inode_has_attr_fork(ip) &&35053505 ip->i_af.if_format == XFS_DINODE_FMT_LOCAL &&35063506 xfs_ifork_verify_local_attr(ip))35073507 goto flush_out;···35203520 }3521352135223522 xfs_iflush_fork(ip, dip, iip, XFS_DATA_FORK);35233523- if (XFS_IFORK_Q(ip))35233523+ if (xfs_inode_has_attr_fork(ip))35243524 xfs_iflush_fork(ip, dip, iip, XFS_ATTR_FORK);3525352535263526 /*
+6-1
fs/xfs/xfs_inode.h
···7777 struct list_head i_ioend_list;7878} xfs_inode_t;79798080+static inline bool xfs_inode_has_attr_fork(struct xfs_inode *ip)8181+{8282+ return ip->i_forkoff > 0;8383+}8484+8085static inline struct xfs_ifork *8186xfs_ifork_ptr(8287 struct xfs_inode *ip,···9186 case XFS_DATA_FORK:9287 return &ip->i_df;9388 case XFS_ATTR_FORK:9494- if (!XFS_IFORK_Q(ip))8989+ if (!xfs_inode_has_attr_fork(ip))9590 return NULL;9691 return &ip->i_af;9792 case XFS_COW_FORK:
+2-2
fs/xfs/xfs_inode_item.c
···143143 xfs_log_dinode_size(ip->i_mount);144144145145 xfs_inode_item_data_fork_size(iip, nvecs, nbytes);146146- if (XFS_IFORK_Q(ip))146146+ if (xfs_inode_has_attr_fork(ip))147147 xfs_inode_item_attr_fork_size(iip, nvecs, nbytes);148148}149149···480480481481 xfs_inode_item_format_core(ip, lv, &vecp);482482 xfs_inode_item_format_data_fork(iip, ilf, lv, &vecp);483483- if (XFS_IFORK_Q(ip)) {483483+ if (xfs_inode_has_attr_fork(ip)) {484484 xfs_inode_item_format_attr_fork(iip, ilf, lv, &vecp);485485 } else {486486 iip->ili_fields &=
+1-1
fs/xfs/xfs_iomap.c
···13071307 lockmode = xfs_ilock_attr_map_shared(ip);1308130813091309 /* if there are no attribute fork or extents, return ENOENT */13101310- if (!XFS_IFORK_Q(ip) || !ip->i_af.if_nextents) {13101310+ if (!xfs_inode_has_attr_fork(ip) || !ip->i_af.if_nextents) {13111311 error = -ENOENT;13121312 goto out_unlock;13131313 }
+1-1
fs/xfs/xfs_iops.c
···12791279 * If there is no attribute fork no ACL can exist on this inode,12801280 * and it can't have any file capabilities attached to it either.12811281 */12821282- if (!XFS_IFORK_Q(ip)) {12821282+ if (!xfs_inode_has_attr_fork(ip)) {12831283 inode_has_no_xattr(inode);12841284 cache_no_acl(inode);12851285 }