summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-01-23 15:18:21 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-01-26 03:47:23 -0800
commit21b2b12ae44a2583604ce6628b4570b8fd9dbf01 (patch)
treed1bd93b39dd2440c627ee2f0280d714fd8505cbf
parentc95e892e454d6fc49f6749150eca028ff8b2b45d (diff)
protocol/server: unlink dentry only for non-root inodes
in server_lookup_cbk, unlink dentry from the crash on receiving ENOENT from subvolume only for non-root inode. ENOENT can be returned for root inode if export directory is deleted Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 526 (glusterfsd crash when export dir is deleted and revalidate happens on /) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=526
-rw-r--r--xlators/protocol/server/src/server-protocol.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c
index a7f6294f387..8603d41585e 100644
--- a/xlators/protocol/server/src/server-protocol.c
+++ b/xlators/protocol/server/src/server-protocol.c
@@ -2456,8 +2456,11 @@ server_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
} else {
if (state->is_revalidate && op_errno == ENOENT) {
- inode_unlink (state->loc.inode, state->loc.parent,
- state->loc.name);
+ if (state->loc.inode->ino != 1) {
+ inode_unlink (state->loc.inode,
+ state->loc.parent,
+ state->loc.name);
+ }
}
gf_log (this->name,