]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: embedded the attrlist cursor into struct xfs_attr_list_context
authorChristoph Hellwig <hch@lst.de>
Fri, 1 May 2020 21:37:08 +0000 (17:37 -0400)
committerEric Sandeen <sandeen@redhat.com>
Fri, 1 May 2020 21:37:08 +0000 (17:37 -0400)
Source kernel commit: e3a19cdea84a42d44ef42ff8b5459c903992bbf2

The attrlist cursor only exists as part of an attr list context, so
embedd the structure instead of pointing to it.  Also give it a proper
xfs_ prefix and remove the obsolete typedef.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_attr.h
libxfs/xfs_attr_leaf.h

index a6bedb0eda2630e625f210225109ff4312d8d003..0d2d05908537c706bd8e337d0b51ffe80ca190b9 100644 (file)
@@ -31,14 +31,14 @@ struct xfs_attr_list_context;
 /*
  * Kernel-internal version of the attrlist cursor.
  */
-typedef struct attrlist_cursor_kern {
+struct xfs_attrlist_cursor_kern {
        __u32   hashval;        /* hash value of next entry to add */
        __u32   blkno;          /* block containing entry (suggestion) */
        __u32   offset;         /* offset in list of equal-hashvals */
        __u16   pad1;           /* padding to match user-level */
        __u8    pad2;           /* padding to match user-level */
        __u8    initted;        /* T/F: cursor has been initialized */
-} attrlist_cursor_kern_t;
+};
 
 
 /*========================================================================
@@ -53,7 +53,7 @@ typedef void (*put_listent_func_t)(struct xfs_attr_list_context *, int,
 struct xfs_attr_list_context {
        struct xfs_trans        *tp;
        struct xfs_inode        *dp;            /* inode */
-       struct attrlist_cursor_kern *cursor;    /* position in list */
+       struct xfs_attrlist_cursor_kern cursor; /* position in list */
        void                    *buffer;        /* output buffer */
 
        /*
index 73615b1dd1a80dacd3f385a707a058718e659ebb..6dd2d937a42a36ce0ee40af8818fd13c50fac268 100644 (file)
@@ -8,7 +8,6 @@
 #define        __XFS_ATTR_LEAF_H__
 
 struct attrlist;
-struct attrlist_cursor_kern;
 struct xfs_attr_list_context;
 struct xfs_da_args;
 struct xfs_da_state;