]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: use helpers to extract xattr op from opflags
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:22:44 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:02 +0000 (17:01 -0700)
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 <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_attr.h

index c8005f52102adc530efbd7308bba9524cb76cb1e..79b457adb7bda0acae237ddaf30f17735825bdbb 100644 (file)
@@ -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.