diff options
| author | Ingo Molnar <mingo@kernel.org> | 2014-01-13 11:44:41 +0100 | 
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2014-01-13 11:44:41 +0100 | 
| commit | 1c62448e39285b23b4770aaf46d32368fff990df (patch) | |
| tree | c6c6cf1a80a762a5859bfdaf3941294a47ea8eee /fs/xfs/xfs_dir2_node.c | |
| parent | 47933ad41a86a4a9b50bed7c9b9bd2ba242aac63 (diff) | |
| parent | 7e22e91102c6b9df7c4ae2168910e19d2bb14cd6 (diff) | |
Merge tag 'v3.13-rc8' into core/locking
Refresh the tree with the latest fixes, before applying new changes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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 56369d4509d..48c7d18f68c 100644 --- a/fs/xfs/xfs_dir2_node.c +++ b/fs/xfs/xfs_dir2_node.c @@ -2067,12 +2067,12 @@ xfs_dir2_node_lookup(   */  int						/* error */  xfs_dir2_node_removename( -	xfs_da_args_t		*args)		/* operation arguments */ +	struct xfs_da_args	*args)		/* operation arguments */  { -	xfs_da_state_blk_t	*blk;		/* leaf block */ +	struct xfs_da_state_blk	*blk;		/* leaf block */  	int			error;		/* error return value */  	int			rval;		/* operation return value */ -	xfs_da_state_t		*state;		/* btree cursor */ +	struct xfs_da_state	*state;		/* btree cursor */  	trace_xfs_dir2_node_removename(args); @@ -2084,19 +2084,18 @@ xfs_dir2_node_removename(  	state->mp = args->dp->i_mount;  	state->blocksize = state->mp->m_dirblksize;  	state->node_ents = state->mp->m_dir_node_ents; -	/* -	 * Look up the entry we're deleting, set up the cursor. -	 */ + +	/* Look up the entry we're deleting, set up the cursor. */  	error = xfs_da3_node_lookup_int(state, &rval);  	if (error) -		rval = error; -	/* -	 * Didn't find it, upper layer screwed up. -	 */ +		goto out_free; + +	/* Didn't find it, upper layer screwed up. */  	if (rval != EEXIST) { -		xfs_da_state_free(state); -		return rval; +		error = rval; +		goto out_free;  	} +  	blk = &state->path.blk[state->path.active - 1];  	ASSERT(blk->magic == XFS_DIR2_LEAFN_MAGIC);  	ASSERT(state->extravalid); @@ -2107,7 +2106,7 @@ xfs_dir2_node_removename(  	error = xfs_dir2_leafn_remove(args, blk->bp, blk->index,  		&state->extrablk, &rval);  	if (error) -		return error; +		goto out_free;  	/*  	 * Fix the hash values up the btree.  	 */ @@ -2122,6 +2121,7 @@ xfs_dir2_node_removename(  	 */  	if (!error)  		error = xfs_dir2_node_to_leaf(state); +out_free:  	xfs_da_state_free(state);  	return error;  }  | 
