From c9a205497328a0d9ad0d005ae5c2483011e852f9 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Sat, 23 Jan 2010 15:18:21 +0000 Subject: 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 Signed-off-by: Anand V. Avati 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 --- xlators/protocol/server/src/server-protocol.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xlators/protocol') 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, -- cgit