summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-protocol.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2009-07-17 14:13:37 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-07-17 14:05:32 -0700
commit215b62f1db24bc7ff55d224046e343401d78c38b (patch)
treee0077608e7ea07bb65fbf9bcac56aa892a07e7b1 /xlators/protocol/server/src/server-protocol.c
parentf5f018e66eaba3bf8cd8896c179692f055b2b309 (diff)
server: don't check for 'loc->parent' in entrylk and inodelk calls
the lock operation on entry or inode is going to happen on only one inode, and it doesn't need dentry (with info on parent) for the lock operation to complete. Hence, in server_{inode,entry}lk() calls after server_loc_fill, we -should not- be checking for parent inode. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112
Diffstat (limited to 'xlators/protocol/server/src/server-protocol.c')
-rw-r--r--xlators/protocol/server/src/server-protocol.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c
index e0553a1..e4cb366 100644
--- a/xlators/protocol/server/src/server-protocol.c
+++ b/xlators/protocol/server/src/server-protocol.c
@@ -5694,8 +5694,7 @@ server_inodelk (call_frame_t *frame, xlator_t *bound_xl,
state->volume, &state->loc,
state->cmd, &state->flock);
- if ((state->loc.parent == NULL) ||
- (state->loc.inode == NULL)) {
+ if (state->loc.inode == NULL) {
do_path_lookup (inodelk_stub, &(state->loc));
} else {
call_resume (inodelk_stub);
@@ -5853,8 +5852,7 @@ server_entrylk (call_frame_t *frame, xlator_t *bound_xl,
state->volume, &state->loc,
state->name, state->cmd, state->type);
- if (((state->loc.parent == NULL) && IS_NOT_ROOT(pathlen)) ||
- (state->loc.inode == NULL)) {
+ if (state->loc.inode == NULL) {
do_path_lookup (entrylk_stub, &(state->loc));
} else {
call_resume (entrylk_stub);