Patchwork [BUG:448] protocol/server: fix bad reference to @inode in server_link_cbk

login
register
Submitter Anand Avati
Date 2009-12-06 10:11:02
Message ID <20091206101102.GA1288@dev.gluster.com>
Download mbox | patch
Permalink /patch/2577/
State Accepted
Headers show

Comments

Anand Avati - 2009-12-06 10:11:02
when op_ret is -1, gf_log refers to @inode which can be NULL. fix
this to refer to state->loc2.inode instead

Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
---
 xlators/protocol/server/src/server-protocol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c
index 1f2cb7d..7b51f9f 100644
--- a/xlators/protocol/server/src/server-protocol.c
+++ b/xlators/protocol/server/src/server-protocol.c
@@ -1610,7 +1610,7 @@  server_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
                 gf_log (state->bound_xl->name, GF_LOG_DEBUG,
                         "%"PRId64": LINK (%"PRId64") %"PRId64"/%s ==> %"PRId64"/%s "
                         " ==> %"PRId32" (%s)",
-                        frame->root->unique, inode->ino,
+                        frame->root->unique, state->loc2.inode->ino,
                         state->loc2.parent->ino,
                         state->loc2.name, state->loc.parent->ino,
                         state->loc.name,