diff options
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-write.c')
| -rw-r--r-- | xlators/cluster/afr/src/afr-dir-write.c | 48 | 
1 files changed, 40 insertions, 8 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index 30410354..49cf8d45 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -350,7 +350,11 @@ afr_create (call_frame_t *frame, xlator_t *this,          local->transaction.main_frame = frame;          local->transaction.basename = AFR_BASENAME (loc->path); -        afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        ret = afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        if (ret < 0) { +            op_errno = -ret; +            goto out; +        }          ret = 0;  out: @@ -538,7 +542,11 @@ afr_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,          local->transaction.main_frame = frame;          local->transaction.basename = AFR_BASENAME (loc->path); -        afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        ret = afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        if (ret < 0) { +            op_errno = -ret; +            goto out; +        }          ret = 0;  out: @@ -727,7 +735,11 @@ afr_mkdir (call_frame_t *frame, xlator_t *this,          local->transaction.main_frame = frame;          local->transaction.basename = AFR_BASENAME (loc->path); -        afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        ret = afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        if (ret < 0) { +            op_errno = -ret; +            goto out; +        }          ret = 0;  out: @@ -912,7 +924,11 @@ afr_link (call_frame_t *frame, xlator_t *this,          local->transaction.main_frame   = frame;          local->transaction.basename     = AFR_BASENAME (newloc->path); -        afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        ret = afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        if (ret < 0) { +            op_errno = -ret; +            goto out; +        }          ret = 0;  out: @@ -1102,7 +1118,11 @@ afr_symlink (call_frame_t *frame, xlator_t *this,          local->transaction.main_frame   = frame;          local->transaction.basename     = AFR_BASENAME (loc->path); -        afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        ret = afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        if (ret < 0) { +            op_errno = -ret; +            goto out; +        }          ret = 0;  out: @@ -1295,7 +1315,11 @@ afr_rename (call_frame_t *frame, xlator_t *this,          local->transaction.basename     = AFR_BASENAME (oldloc->path);          local->transaction.new_basename = AFR_BASENAME (newloc->path); -        afr_transaction (transaction_frame, this, AFR_ENTRY_RENAME_TRANSACTION); +        ret = afr_transaction (transaction_frame, this, AFR_ENTRY_RENAME_TRANSACTION); +        if (ret < 0) { +            op_errno = -ret; +            goto out; +        }          ret = 0;  out: @@ -1473,7 +1497,11 @@ afr_unlink (call_frame_t *frame, xlator_t *this,          local->transaction.main_frame = frame;          local->transaction.basename = AFR_BASENAME (loc->path); -        afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        ret = afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        if (ret < 0) { +            op_errno = -ret; +            goto out; +        }          ret = 0;  out: @@ -1657,7 +1685,11 @@ afr_rmdir (call_frame_t *frame, xlator_t *this,          local->transaction.main_frame = frame;          local->transaction.basename = AFR_BASENAME (loc->path); -        afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        ret = afr_transaction (transaction_frame, this, AFR_ENTRY_TRANSACTION); +        if (ret < 0) { +            op_errno = -ret; +            goto out; +        }          ret = 0;  out:  | 
