summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorAllison Henderson <allison.henderson@oracle.com>2021-05-21 09:53:40 +0200
committerAllison Henderson <allison.henderson@oracle.com>2021-06-01 19:49:49 +0200
commit4fd084dbbd05402bb6e24782b8e9f9ea3e8ab3d6 (patch)
tree841109f48134e586f205f87f87d378d73a37ff31 /fs/xfs
parentxfs: Remove xfs_attr_rmtval_set (diff)
downloadlinux-4fd084dbbd05402bb6e24782b8e9f9ea3e8ab3d6.tar.xz
linux-4fd084dbbd05402bb6e24782b8e9f9ea3e8ab3d6.zip
xfs: Clean up xfs_attr_node_addname_clear_incomplete
We can use the helper function xfs_attr_node_remove_name to reduce duplicate code in this function Signed-off-by: Allison Henderson <allison.henderson@oracle.com> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/libxfs/xfs_attr.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
index df20537c5533..2387a41b705e 100644
--- a/fs/xfs/libxfs/xfs_attr.c
+++ b/fs/xfs/libxfs/xfs_attr.c
@@ -63,6 +63,8 @@ STATIC int xfs_attr_fillstate(xfs_da_state_t *state);
STATIC int xfs_attr_refillstate(xfs_da_state_t *state);
STATIC int xfs_attr_set_iter(struct xfs_delattr_context *dac,
struct xfs_buf **leaf_bp);
+STATIC int xfs_attr_node_remove_name(struct xfs_da_args *args,
+ struct xfs_da_state *state);
int
xfs_inode_hasattr(
@@ -1207,7 +1209,6 @@ xfs_attr_node_addname_clear_incomplete(
{
struct xfs_da_args *args = dac->da_args;
struct xfs_da_state *state = NULL;
- struct xfs_da_state_blk *blk;
int retval = 0;
int error = 0;
@@ -1222,13 +1223,7 @@ xfs_attr_node_addname_clear_incomplete(
if (error)
goto out;
- /*
- * Remove the name and update the hashvals in the tree.
- */
- blk = &state->path.blk[state->path.active-1];
- ASSERT(blk->magic == XFS_ATTR_LEAF_MAGIC);
- error = xfs_attr3_leaf_remove(blk->bp, args);
- xfs_da3_fixhashpath(state, &state->path);
+ error = xfs_attr_node_remove_name(args, state);
/*
* Check to see if the tree needs to be collapsed.