From 9b389a3f76bc858f95e498c1539317c7a8bc6188 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Thu, 19 Jan 2012 11:41:55 +0530 Subject: 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 Reviewed-on: http://review.gluster.com/2658 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Vijay Bellur --- xlators/cluster/afr/src/afr-inode-write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster') diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c index cd6ba5e7d..3deca8df1 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); -- cgit