summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-09-18 01:54:09 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-18 00:51:34 -0700
commit1cc83c61c06b8271e856466530513dd63c3e8681 (patch)
treeee8e038c1a09e21640c2b37897ba42b19bb2791d /xlators/protocol/server/src
parent8ba46b4c2d6f67887454d1e6756e6dc476d9457d (diff)
check for 'link_inode' in server protocol
* also log and return in case of 'fd_bind' getting fd with NULL inode. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1635 (running mixed tests glusterfs crashed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1635
Diffstat (limited to 'xlators/protocol/server/src')
-rw-r--r--xlators/protocol/server/src/server3_1-fops.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c
index 1ced00a4b..a0276ad6b 100644
--- a/xlators/protocol/server/src/server3_1-fops.c
+++ b/xlators/protocol/server/src/server3_1-fops.c
@@ -1368,6 +1368,12 @@ server_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
link_inode = inode_link (inode, state->loc.parent,
state->loc.name, stbuf);
+ if (!link_inode) {
+ op_ret = -1;
+ op_errno = ENOENT;
+ goto out;
+ }
+
if (link_inode != inode) {
/*
VERY racy code (if used anywhere else)
@@ -1402,6 +1408,7 @@ server_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
op_ret, strerror (op_errno));
}
+out:
req = frame->local;
rsp.fd = fd_no;