From: Christoph Hellwig Date: Fri, 5 Oct 2018 02:36:11 +0000 (-0500) Subject: xfs: remove the xfs_ifork_t typedef X-Git-Tag: v4.19.0-rc0~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e07055b8a79ec7842d532facf20f5a3373611480;p=thirdparty%2Fxfsprogs-dev.git xfs: remove the xfs_ifork_t typedef Source kernel commit: 3ba738df25239f877f6a98ce1cc925fa7e924cd3 We only have a few more callers left, so seize the opportunity and kill it off. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/libxfs/init.c b/libxfs/init.c index 2f3899720..36d637c5e 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -392,7 +392,7 @@ manage_zones(int release) /* otherwise initialise zone allocation */ xfs_buf_zone = kmem_zone_init(sizeof(xfs_buf_t), "xfs_buffer"); xfs_inode_zone = kmem_zone_init(sizeof(struct xfs_inode), "xfs_inode"); - xfs_ifork_zone = kmem_zone_init(sizeof(xfs_ifork_t), "xfs_ifork"); + xfs_ifork_zone = kmem_zone_init(sizeof(struct xfs_ifork), "xfs_ifork"); xfs_ili_zone = kmem_zone_init( sizeof(xfs_inode_log_item_t), "xfs_inode_log_item"); xfs_buf_item_zone = kmem_zone_init( diff --git a/libxfs/util.c b/libxfs/util.c index b4a929ae3..eb99ef74d 100644 --- a/libxfs/util.c +++ b/libxfs/util.c @@ -386,7 +386,7 @@ libxfs_iprint( { struct xfs_icdinode *dip; xfs_extnum_t i = 0; - xfs_ifork_t *ifp; /* inode fork pointer */ + struct xfs_ifork *ifp; /* inode fork pointer */ struct xfs_iext_cursor icur; xfs_bmbt_irec_t rec; diff --git a/libxfs/xfs_attr_leaf.c b/libxfs/xfs_attr_leaf.c index 70a48e3a9..3e349ab49 100644 --- a/libxfs/xfs_attr_leaf.c +++ b/libxfs/xfs_attr_leaf.c @@ -523,7 +523,7 @@ xfs_attr_shortform_create(xfs_da_args_t *args) { xfs_attr_sf_hdr_t *hdr; xfs_inode_t *dp; - xfs_ifork_t *ifp; + struct xfs_ifork *ifp; trace_xfs_attr_sf_create(args); @@ -558,7 +558,7 @@ xfs_attr_shortform_add(xfs_da_args_t *args, int forkoff) int i, offset, size; xfs_mount_t *mp; xfs_inode_t *dp; - xfs_ifork_t *ifp; + struct xfs_ifork *ifp; trace_xfs_attr_sf_add(args); @@ -699,7 +699,7 @@ xfs_attr_shortform_lookup(xfs_da_args_t *args) xfs_attr_shortform_t *sf; xfs_attr_sf_entry_t *sfe; int i; - xfs_ifork_t *ifp; + struct xfs_ifork *ifp; trace_xfs_attr_sf_lookup(args); diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c index f280f929b..f94dd2b92 100644 --- a/libxfs/xfs_bmap.c +++ b/libxfs/xfs_bmap.c @@ -317,7 +317,7 @@ xfs_bmap_check_leaf_extents( xfs_buf_t *bp; /* buffer for "block" */ int error; /* error return value */ xfs_extnum_t i=0, j; /* index into the extents list */ - xfs_ifork_t *ifp; /* fork structure */ + struct xfs_ifork *ifp; /* fork structure */ int level; /* btree level, for checking */ xfs_mount_t *mp; /* file system mount structure */ __be64 *pp; /* pointer to block address */ @@ -585,7 +585,7 @@ xfs_bmap_btree_to_extents( xfs_fsblock_t cbno; /* child block number */ xfs_buf_t *cbp; /* child block's buffer */ int error; /* error return value */ - xfs_ifork_t *ifp; /* inode fork data */ + struct xfs_ifork *ifp; /* inode fork data */ xfs_mount_t *mp; /* mount point structure */ __be64 *pp; /* ptr to block address */ struct xfs_btree_block *rblock;/* root btree block */ @@ -808,7 +808,7 @@ xfs_bmap_local_to_extents( { int error = 0; int flags; /* logging flags returned */ - xfs_ifork_t *ifp; /* inode fork pointer */ + struct xfs_ifork *ifp; /* inode fork pointer */ xfs_alloc_arg_t args; /* allocation arguments */ xfs_buf_t *bp; /* buffer for extent block */ struct xfs_bmbt_irec rec; @@ -1462,7 +1462,7 @@ xfs_bmap_one_block( xfs_inode_t *ip, /* incore inode */ int whichfork) /* data or attr fork */ { - xfs_ifork_t *ifp; /* inode fork pointer */ + struct xfs_ifork *ifp; /* inode fork pointer */ int rval; /* return value */ xfs_bmbt_irec_t s; /* internal version of extent */ struct xfs_iext_cursor icur; @@ -1500,7 +1500,7 @@ xfs_bmap_add_extent_delay_real( struct xfs_bmbt_irec *new = &bma->got; int error; /* error return value */ int i; /* temp state */ - xfs_ifork_t *ifp; /* inode fork pointer */ + struct xfs_ifork *ifp; /* inode fork pointer */ xfs_fileoff_t new_endoff; /* end offset of new entry */ xfs_bmbt_irec_t r[3]; /* neighbor extent entries */ /* left is 0, right is 1, prev is 2 */ @@ -2009,7 +2009,7 @@ xfs_bmap_add_extent_unwritten_real( xfs_btree_cur_t *cur; /* btree cursor */ int error; /* error return value */ int i; /* temp state */ - xfs_ifork_t *ifp; /* inode fork pointer */ + struct xfs_ifork *ifp; /* inode fork pointer */ xfs_fileoff_t new_endoff; /* end offset of new entry */ xfs_bmbt_irec_t r[3]; /* neighbor extent entries */ /* left is 0, right is 1, prev is 2 */ @@ -2477,7 +2477,7 @@ xfs_bmap_add_extent_hole_delay( struct xfs_iext_cursor *icur, xfs_bmbt_irec_t *new) /* new data to add to file extents */ { - xfs_ifork_t *ifp; /* inode fork pointer */ + struct xfs_ifork *ifp; /* inode fork pointer */ xfs_bmbt_irec_t left; /* left neighbor extent entry */ xfs_filblks_t newlen=0; /* new indirect size */ xfs_filblks_t oldlen=0; /* old indirect size */ @@ -4835,7 +4835,7 @@ xfs_bmap_del_extent_real( struct xfs_bmbt_irec got; /* current extent entry */ xfs_fileoff_t got_endoff; /* first offset past got */ int i; /* temp state */ - xfs_ifork_t *ifp; /* inode fork pointer */ + struct xfs_ifork *ifp; /* inode fork pointer */ xfs_mount_t *mp; /* mount structure */ xfs_filblks_t nblks; /* quota/sb block count */ xfs_bmbt_irec_t new; /* new record to be inserted */ @@ -5083,7 +5083,7 @@ __xfs_bunmapi( int error; /* error return value */ xfs_extnum_t extno; /* extent number in list */ struct xfs_bmbt_irec got; /* current extent record */ - xfs_ifork_t *ifp; /* inode fork pointer */ + struct xfs_ifork *ifp; /* inode fork pointer */ int isrt; /* freeing in rt area */ int logflags; /* transaction logging flags */ xfs_extlen_t mod; /* rt extent offset */ diff --git a/libxfs/xfs_inode_fork.c b/libxfs/xfs_inode_fork.c index ea2b5a056..4cad396db 100644 --- a/libxfs/xfs_inode_fork.c +++ b/libxfs/xfs_inode_fork.c @@ -266,7 +266,7 @@ xfs_iformat_btree( { struct xfs_mount *mp = ip->i_mount; xfs_bmdr_block_t *dfp; - xfs_ifork_t *ifp; + struct xfs_ifork *ifp; /* REFERENCED */ int nrecs; int size; @@ -344,7 +344,7 @@ xfs_iroot_realloc( { struct xfs_mount *mp = ip->i_mount; int cur_max; - xfs_ifork_t *ifp; + struct xfs_ifork *ifp; struct xfs_btree_block *new_broot; int new_max; size_t new_size; @@ -500,7 +500,7 @@ xfs_idestroy_fork( xfs_inode_t *ip, int whichfork) { - xfs_ifork_t *ifp; + struct xfs_ifork *ifp; ifp = XFS_IFORK_PTR(ip, whichfork); if (ifp->if_broot != NULL) { @@ -589,7 +589,7 @@ xfs_iflush_fork( int whichfork) { char *cp; - xfs_ifork_t *ifp; + struct xfs_ifork *ifp; xfs_mount_t *mp; static const short brootflag[2] = { XFS_ILOG_DBROOT, XFS_ILOG_ABROOT }; diff --git a/libxfs/xfs_inode_fork.h b/libxfs/xfs_inode_fork.h index 46242052a..149214337 100644 --- a/libxfs/xfs_inode_fork.h +++ b/libxfs/xfs_inode_fork.h @@ -12,7 +12,7 @@ struct xfs_dinode; /* * File incore extent information, present for each of data & attr forks. */ -typedef struct xfs_ifork { +struct xfs_ifork { int if_bytes; /* bytes in if_u1 */ struct xfs_btree_block *if_broot; /* file's incore btree root */ short if_broot_bytes; /* bytes allocated for root */ @@ -22,7 +22,7 @@ typedef struct xfs_ifork { void *if_root; /* extent tree root */ char *if_data; /* inline file data */ } if_u1; -} xfs_ifork_t; +}; /* * Per-fork incore inode flags. diff --git a/repair/phase6.c b/repair/phase6.c index f27ad6091..ff5110427 100644 --- a/repair/phase6.c +++ b/repair/phase6.c @@ -479,7 +479,7 @@ bmap_next_offset( xfs_fileoff_t bno; /* current block */ int error; /* error return value */ xfs_bmbt_irec_t got; /* current extent value */ - xfs_ifork_t *ifp; /* inode fork pointer */ + struct xfs_ifork *ifp; /* inode fork pointer */ struct xfs_iext_cursor icur; if (XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_BTREE &&