summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-inode-write.c
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2012-01-19 11:41:55 +0530
committerVijay Bellur <vijay@gluster.com>2012-01-19 09:03:39 -0800
commit9b389a3f76bc858f95e498c1539317c7a8bc6188 (patch)
tree3684de83b5f58741e7dda808a435077226759ee0 /xlators/cluster/afr/src/afr-inode-write.c
parent6481f062b8ad0f47fa7715f78b7bf61623d1dc9a (diff)
cluster/afr: do not unlock without holding the lock on the fd
In afr_open_fd_fix we were unlocking the local->fd->lock, without holding the lock on it if we were not able to get the fd context. Now we are directly going to out and returning, instead of going to unlock without holding the lock. Change-Id: I0da638bbd2c269127cf111b3aac707e4a95d20c6 BUG: 783036 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2658 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-inode-write.c')
-rw-r--r--xlators/cluster/afr/src/afr-inode-write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c
index cd6ba5e7df8..3deca8df1ef 100644
--- a/xlators/cluster/afr/src/afr-inode-write.c
+++ b/xlators/cluster/afr/src/afr-inode-write.c
@@ -369,7 +369,7 @@ afr_open_fd_fix (call_frame_t *frame, xlator_t *this, gf_boolean_t pause_fop)
fd_ctx = afr_fd_ctx_get (local->fd, this);
if (!fd_ctx) {
ret = -EINVAL;
- goto unlock;
+ goto out;
}
LOCK (&local->fd->lock);