diff options
Diffstat (limited to 'fs/xfs/xfs_dir2_node.c')
-rw-r--r-- | fs/xfs/xfs_dir2_node.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c index 56369d4509d5..48c7d18f68c3 100644 --- a/fs/xfs/xfs_dir2_node.c +++ b/fs/xfs/xfs_dir2_node.c | |||
@@ -2067,12 +2067,12 @@ xfs_dir2_node_lookup( | |||
2067 | */ | 2067 | */ |
2068 | int /* error */ | 2068 | int /* error */ |
2069 | xfs_dir2_node_removename( | 2069 | xfs_dir2_node_removename( |
2070 | xfs_da_args_t *args) /* operation arguments */ | 2070 | struct xfs_da_args *args) /* operation arguments */ |
2071 | { | 2071 | { |
2072 | xfs_da_state_blk_t *blk; /* leaf block */ | 2072 | struct xfs_da_state_blk *blk; /* leaf block */ |
2073 | int error; /* error return value */ | 2073 | int error; /* error return value */ |
2074 | int rval; /* operation return value */ | 2074 | int rval; /* operation return value */ |
2075 | xfs_da_state_t *state; /* btree cursor */ | 2075 | struct xfs_da_state *state; /* btree cursor */ |
2076 | 2076 | ||
2077 | trace_xfs_dir2_node_removename(args); | 2077 | trace_xfs_dir2_node_removename(args); |
2078 | 2078 | ||
@@ -2084,19 +2084,18 @@ xfs_dir2_node_removename( | |||
2084 | state->mp = args->dp->i_mount; | 2084 | state->mp = args->dp->i_mount; |
2085 | state->blocksize = state->mp->m_dirblksize; | 2085 | state->blocksize = state->mp->m_dirblksize; |
2086 | state->node_ents = state->mp->m_dir_node_ents; | 2086 | state->node_ents = state->mp->m_dir_node_ents; |
2087 | /* | 2087 | |
2088 | * Look up the entry we're deleting, set up the cursor. | 2088 | /* Look up the entry we're deleting, set up the cursor. */ |
2089 | */ | ||
2090 | error = xfs_da3_node_lookup_int(state, &rval); | 2089 | error = xfs_da3_node_lookup_int(state, &rval); |
2091 | if (error) | 2090 | if (error) |
2092 | rval = error; | 2091 | goto out_free; |
2093 | /* | 2092 | |
2094 | * Didn't find it, upper layer screwed up. | 2093 | /* Didn't find it, upper layer screwed up. */ |
2095 | */ | ||
2096 | if (rval != EEXIST) { | 2094 | if (rval != EEXIST) { |
2097 | xfs_da_state_free(state); | 2095 | error = rval; |
2098 | return rval; | 2096 | goto out_free; |
2099 | } | 2097 | } |
2098 | |||
2100 | blk = &state->path.blk[state->path.active - 1]; | 2099 | blk = &state->path.blk[state->path.active - 1]; |
2101 | ASSERT(blk->magic == XFS_DIR2_LEAFN_MAGIC); | 2100 | ASSERT(blk->magic == XFS_DIR2_LEAFN_MAGIC); |
2102 | ASSERT(state->extravalid); | 2101 | ASSERT(state->extravalid); |
@@ -2107,7 +2106,7 @@ xfs_dir2_node_removename( | |||
2107 | error = xfs_dir2_leafn_remove(args, blk->bp, blk->index, | 2106 | error = xfs_dir2_leafn_remove(args, blk->bp, blk->index, |
2108 | &state->extrablk, &rval); | 2107 | &state->extrablk, &rval); |
2109 | if (error) | 2108 | if (error) |
2110 | return error; | 2109 | goto out_free; |
2111 | /* | 2110 | /* |
2112 | * Fix the hash values up the btree. | 2111 | * Fix the hash values up the btree. |
2113 | */ | 2112 | */ |
@@ -2122,6 +2121,7 @@ xfs_dir2_node_removename( | |||
2122 | */ | 2121 | */ |
2123 | if (!error) | 2122 | if (!error) |
2124 | error = xfs_dir2_node_to_leaf(state); | 2123 | error = xfs_dir2_node_to_leaf(state); |
2124 | out_free: | ||
2125 | xfs_da_state_free(state); | 2125 | xfs_da_state_free(state); |
2126 | return error; | 2126 | return error; |
2127 | } | 2127 | } |