diff options
author | Anand Avati <avati@gluster.com> | 2010-01-23 15:18:21 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-01-23 12:58:04 -0800 |
commit | c9a205497328a0d9ad0d005ae5c2483011e852f9 (patch) | |
tree | 11b023263ef111a86108b7f4c96a0165412b3641 /xlators/protocol/server/src/server-protocol.c | |
parent | bc111de015918ceeb0234596860a461dccb6862c (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
Diffstat (limited to 'xlators/protocol/server/src/server-protocol.c')
-rw-r--r-- | xlators/protocol/server/src/server-protocol.c | 7 |
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, |