aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-03-07 19:50:11 -0500
committerDarrick J. Wong <darrick.wong@oracle.com>2019-03-08 17:24:43 -0500
commit79622c7ce6879c25ce121ee0db91c0ac4c7b137c (patch)
tree040c0f913bba6c77b918b1826bf9d02b75cdbd6f
parent7be73fa1c1b0b6aaf15d590320f2c5c1108cb87a (diff)
xfs: clean up xfs_dir2_leafn_add
Remove typedefs and consolidate local variable initialization. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
-rw-r--r--fs/xfs/libxfs/xfs_dir2_node.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2_node.c b/fs/xfs/libxfs/xfs_dir2_node.c
index de46f26c5292..16731d2d684b 100644
--- a/fs/xfs/libxfs/xfs_dir2_node.c
+++ b/fs/xfs/libxfs/xfs_dir2_node.c
@@ -426,26 +426,22 @@ xfs_dir2_leaf_to_node(
426static int /* error */ 426static int /* error */
427xfs_dir2_leafn_add( 427xfs_dir2_leafn_add(
428 struct xfs_buf *bp, /* leaf buffer */ 428 struct xfs_buf *bp, /* leaf buffer */
429 xfs_da_args_t *args, /* operation arguments */ 429 struct xfs_da_args *args, /* operation arguments */
430 int index) /* insertion pt for new entry */ 430 int index) /* insertion pt for new entry */
431{ 431{
432 struct xfs_dir3_icleaf_hdr leafhdr;
433 struct xfs_inode *dp = args->dp;
434 struct xfs_dir2_leaf *leaf = bp->b_addr;
435 struct xfs_dir2_leaf_entry *lep;
436 struct xfs_dir2_leaf_entry *ents;
432 int compact; /* compacting stale leaves */ 437 int compact; /* compacting stale leaves */
433 xfs_inode_t *dp; /* incore directory inode */ 438 int highstale = 0; /* next stale entry */
434 int highstale; /* next stale entry */
435 xfs_dir2_leaf_t *leaf; /* leaf structure */
436 xfs_dir2_leaf_entry_t *lep; /* leaf entry */
437 int lfloghigh; /* high leaf entry logging */ 439 int lfloghigh; /* high leaf entry logging */
438 int lfloglow; /* low leaf entry logging */ 440 int lfloglow; /* low leaf entry logging */
439 int lowstale; /* previous stale entry */ 441 int lowstale = 0; /* previous stale entry */
440 struct xfs_dir3_icleaf_hdr leafhdr;
441 struct xfs_dir2_leaf_entry *ents;
442 442
443 trace_xfs_dir2_leafn_add(args, index); 443 trace_xfs_dir2_leafn_add(args, index);
444 444
445 dp = args->dp;
446 leaf = bp->b_addr;
447 highstale = 0;
448 lowstale = 0;
449 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf); 445 dp->d_ops->leaf_hdr_from_disk(&leafhdr, leaf);
450 ents = dp->d_ops->leaf_ents_p(leaf); 446 ents = dp->d_ops->leaf_ents_p(leaf);
451 447