diff options
Diffstat (limited to 'xlators/cluster/afr/src/afr-inode-write.c')
| -rw-r--r-- | xlators/cluster/afr/src/afr-inode-write.c | 18 | 
1 files changed, 8 insertions, 10 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c index eff01da8610..f02b5fe1e6d 100644 --- a/xlators/cluster/afr/src/afr-inode-write.c +++ b/xlators/cluster/afr/src/afr-inode-write.c @@ -47,7 +47,6 @@  #include "afr.h"  #include "afr-transaction.h" -  /* {{{ writev */  int @@ -1366,11 +1365,10 @@ afr_setxattr_done (call_frame_t *frame, xlator_t *this)  	local->transaction.unwind (frame, this);  	AFR_STACK_DESTROY (frame); -	 +  	return 0;  } -  int  afr_setxattr (call_frame_t *frame, xlator_t *this,  	      loc_t *loc, dict_t *dict, int32_t flags) @@ -1390,13 +1388,6 @@ afr_setxattr (call_frame_t *frame, xlator_t *this,  	priv = this->private; -	transaction_frame = copy_frame (frame); -	if (!transaction_frame) { -		gf_log (this->name, GF_LOG_ERROR, -			"Out of memory."); -		goto out; -	} -  	ALLOC_OR_GOTO (local, afr_local_t, out);  	ret = AFR_LOCAL_INIT (local, priv); @@ -1405,6 +1396,13 @@ afr_setxattr (call_frame_t *frame, xlator_t *this,  		goto out;  	} +	transaction_frame = copy_frame (frame); +	if (!transaction_frame) { +		gf_log (this->name, GF_LOG_ERROR, +			"Out of memory."); +		goto out; +	} +  	transaction_frame->local = local;  	local->op_ret = -1;  | 
