From: Darrick J. Wong Date: Mon, 29 Jul 2024 23:22:44 +0000 (-0700) Subject: xfs: use helpers to extract xattr op from opflags X-Git-Tag: v6.10.0~24^2~66 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1bb90def4024e861df18726c787c24149838fa9d;p=thirdparty%2Fxfsprogs-dev.git xfs: use helpers to extract xattr op from opflags Source kernel commit: 2a2c05d013d0562076ec475a6deb0991ce1942ca Create helper functions to extract the xattr op from the ondisk xattri log item and the incore attr intent item. These will get more use in the patches that follow. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- diff --git a/libxfs/xfs_attr.h b/libxfs/xfs_attr.h index c8005f52..79b457ad 100644 --- a/libxfs/xfs_attr.h +++ b/libxfs/xfs_attr.h @@ -529,6 +529,11 @@ struct xfs_attr_intent { struct xfs_bmbt_irec xattri_map; }; +static inline unsigned int +xfs_attr_intent_op(const struct xfs_attr_intent *attr) +{ + return attr->xattri_op_flags & XFS_ATTRI_OP_FLAGS_TYPE_MASK; +} /*======================================================================== * Function prototypes for the kernel.