]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: cleanup struct xfs_attr_list_context
authorChristoph Hellwig <hch@lst.de>
Fri, 1 May 2020 21:01:32 +0000 (17:01 -0400)
committerEric Sandeen <sandeen@redhat.com>
Fri, 1 May 2020 21:01:32 +0000 (17:01 -0400)
Source kernel commit: a9c8c69b496117912162cdc38dcae953a07b87f7

Replace the alist char pointer with a void buffer given that different
callers use it in different ways.  Use the chance to remove the typedef
and reduce the indentation of the struct definition so that it doesn't
overflow 80 char lines all over.

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

index 0f369399effddda03d798dc27dafcb86b7cc96b7..0c8f7c7a6b65b54d1815bc1662836f59698217c9 100644 (file)
@@ -99,28 +99,28 @@ typedef struct attrlist_cursor_kern {
 typedef void (*put_listent_func_t)(struct xfs_attr_list_context *, int,
                              unsigned char *, int, int);
 
-typedef struct xfs_attr_list_context {
-       struct xfs_trans                *tp;
-       struct xfs_inode                *dp;            /* inode */
-       struct attrlist_cursor_kern     *cursor;        /* position in list */
-       char                            *alist;         /* output buffer */
+struct xfs_attr_list_context {
+       struct xfs_trans        *tp;
+       struct xfs_inode        *dp;            /* inode */
+       struct attrlist_cursor_kern *cursor;    /* position in list */
+       void                    *buffer;        /* output buffer */
 
        /*
         * Abort attribute list iteration if non-zero.  Can be used to pass
         * error values to the xfs_attr_list caller.
         */
-       int                             seen_enough;
-       bool                            allow_incomplete;
-
-       ssize_t                         count;          /* num used entries */
-       int                             dupcnt;         /* count dup hashvals seen */
-       int                             bufsize;        /* total buffer size */
-       int                             firstu;         /* first used byte in buffer */
-       int                             flags;          /* from VOP call */
-       int                             resynch;        /* T/F: resynch with cursor */
-       put_listent_func_t              put_listent;    /* list output fmt function */
-       int                             index;          /* index into output buffer */
-} xfs_attr_list_context_t;
+       int                     seen_enough;
+       bool                    allow_incomplete;
+
+       ssize_t                 count;          /* num used entries */
+       int                     dupcnt;         /* count dup hashvals seen */
+       int                     bufsize;        /* total buffer size */
+       int                     firstu;         /* first used byte in buffer */
+       int                     flags;          /* from VOP call */
+       int                     resynch;        /* T/F: resynch with cursor */
+       put_listent_func_t      put_listent;    /* list output fmt function */
+       int                     index;          /* index into output buffer */
+};
 
 
 /*========================================================================