]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove xfs_attr_sf_hdr_t
authorChristoph Hellwig <hch@lst.de>
Mon, 15 Apr 2024 23:07:43 +0000 (16:07 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 17 Apr 2024 21:06:26 +0000 (14:06 -0700)
Source kernel commit: 074aea4be1a4074be49a7ec41c674cc02b52fd60

Remove the last two users of the typedef.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
db/attrshort.c
libxfs/xfs_attr_leaf.c
libxfs/xfs_attr_sf.h
repair/attr_repair.c
repair/dinode.c

index c98b90be3ec0b9ce07b7d50249e53f4005731396..7c386d46f88f4624837f6932e289cbc14d5444b5 100644 (file)
@@ -25,7 +25,7 @@ const field_t attr_shortform_flds[] = {
        { NULL }
 };
 
-#define        HOFF(f) bitize(offsetof(xfs_attr_sf_hdr_t, f))
+#define        HOFF(f) bitize(offsetof(struct xfs_attr_sf_hdr, f))
 const field_t  attr_sf_hdr_flds[] = {
        { "totsize", FLDT_UINT16D, OI(HOFF(totsize)), C1, 0, TYP_NONE },
        { "count", FLDT_UINT8D, OI(HOFF(count)), C1, 0, TYP_NONE },
index cf172b6ea4ab8ab88397cfafcfded18ab55d69f9..e3f8f67b5195b27a1471d4eba891c8ebde320195 100644 (file)
@@ -813,7 +813,7 @@ xfs_attr_sf_removename(
        /*
         * Fix up the start offset of the attribute fork
         */
-       if (totsize == sizeof(xfs_attr_sf_hdr_t) && xfs_has_attr2(mp) &&
+       if (totsize == sizeof(struct xfs_attr_sf_hdr) && xfs_has_attr2(mp) &&
            (dp->i_df.if_format != XFS_DINODE_FMT_BTREE) &&
            !(args->op_flags & (XFS_DA_OP_ADDNAME | XFS_DA_OP_REPLACE))) {
                xfs_attr_fork_remove(dp, args->trans);
@@ -821,7 +821,7 @@ xfs_attr_sf_removename(
                xfs_idata_realloc(dp, -size, XFS_ATTR_FORK);
                dp->i_forkoff = xfs_attr_shortform_bytesfit(dp, totsize);
                ASSERT(dp->i_forkoff);
-               ASSERT(totsize > sizeof(xfs_attr_sf_hdr_t) ||
+               ASSERT(totsize > sizeof(struct xfs_attr_sf_hdr) ||
                                (args->op_flags & XFS_DA_OP_ADDNAME) ||
                                !xfs_has_attr2(mp) ||
                                dp->i_df.if_format == XFS_DINODE_FMT_BTREE);
index 9abf7de95465f5aad5c92d9e780221bbc19f7e42..bc44222230248678d2729b5dfc2f03242bb3c97a 100644 (file)
@@ -6,14 +6,6 @@
 #ifndef __XFS_ATTR_SF_H__
 #define        __XFS_ATTR_SF_H__
 
-/*
- * Attribute storage when stored inside the inode.
- *
- * Small attribute lists are packed as tightly as possible so as
- * to fit into the literal area of the inode.
- */
-typedef struct xfs_attr_sf_hdr xfs_attr_sf_hdr_t;
-
 /*
  * We generate this then sort it, attr_list() must return things in hash-order.
  */
index 31c50c127d418f8169286822c5f2d35d372b6311..01e4afb90d5c849183c2782ab3fa0ad3cee989c9 100644 (file)
@@ -222,14 +222,14 @@ process_shortform_attr(
        */
        if (hdr->count == 0)
                /* then the total size should just be the header length */
-               if (be16_to_cpu(hdr->totsize) != sizeof(xfs_attr_sf_hdr_t)) {
+               if (be16_to_cpu(hdr->totsize) != sizeof(struct xfs_attr_sf_hdr)) {
                        /* whoops there's a discrepancy. Clear the hdr */
                        if (!no_modify) {
                                do_warn(
        _("there are no attributes in the fork for inode %" PRIu64 "\n"),
                                        ino);
                                hdr->totsize =
-                                       cpu_to_be16(sizeof(xfs_attr_sf_hdr_t));
+                                       cpu_to_be16(sizeof(struct xfs_attr_sf_hdr));
                                *repair = 1;
                                return(1);
                        } else {
@@ -240,7 +240,7 @@ process_shortform_attr(
                        }
                }
 
-       currentsize = sizeof(xfs_attr_sf_hdr_t);
+       currentsize = sizeof(struct xfs_attr_sf_hdr);
        remainingspace = be16_to_cpu(hdr->totsize) - currentsize;
        nextentry = libxfs_attr_sf_firstentry(hdr);
        for (i = 0; i < hdr->count; i++)  {
index 636e753fc74496080cbf8d9ffe1f9efe60eb17ca..164f51d4c4fc2f1069cf8cb68d22877c04a4e0ba 100644 (file)
@@ -1014,11 +1014,11 @@ process_lclinode(
                                XFS_DFORK_ASIZE(dip, mp));
                        return(1);
                }
-               if (be16_to_cpu(hdr->totsize) < sizeof(xfs_attr_sf_hdr_t)) {
+               if (be16_to_cpu(hdr->totsize) < sizeof(struct xfs_attr_sf_hdr)) {
                        do_warn(
        _("local inode %" PRIu64 " attr too small (size = %d, min size = %zd)\n"),
                                lino, be16_to_cpu(hdr->totsize),
-                               sizeof(xfs_attr_sf_hdr_t));
+                               sizeof(struct xfs_attr_sf_hdr));
                        return(1);
                }
        }