summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-inode-write.c
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-09-19 20:52:46 +0300
committerPranith Kumar Karampuri <pkarampu@redhat.com>2019-10-07 07:31:57 +0000
commitb3df5abbb7ab4d0f5015da9e4d5ecea79eed9b98 (patch)
treea2829e6ff72f9eece4c8d3a531e5db72f5857d7e /xlators/cluster/afr/src/afr-inode-write.c
parentf2404405432cfc7c2369de02f79eee000b9aee13 (diff)
afr: replace afr_frame_return() when possible with direct call
If you are already under lock, just decrement the call count directly instead of removing the lock, re-taking the lock and decrementing. Implements https://github.com/gluster/glusterfs/issues/728 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I3fa20b4651fbdb826655c5a03baeed46e99b5487
Diffstat (limited to 'xlators/cluster/afr/src/afr-inode-write.c')
-rw-r--r--xlators/cluster/afr/src/afr-inode-write.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c
index 8e9de3e12a6..9acb4d0e053 100644
--- a/xlators/cluster/afr/src/afr-inode-write.c
+++ b/xlators/cluster/afr/src/afr-inode-write.c
@@ -174,11 +174,10 @@ __afr_inode_write_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
{
__afr_inode_write_fill(frame, this, child_index, op_ret, op_errno,
prebuf, postbuf, xattr, xdata);
+ call_count = --local->call_count;
}
UNLOCK(&frame->lock);
- call_count = afr_frame_return(frame);
-
if (call_count == 0) {
__afr_inode_write_finalize(frame, this);