From 4a632ea96be3012c583165865bbde392f99a327b Mon Sep 17 00:00:00 2001 From: Basavanagowda Kanur Date: Fri, 17 Apr 2009 14:19:18 +0530 Subject: protocol/client - set remote inode number in inode context for root inode also, during lookup_cbk(). Signed-off-by: Anand V. Avati --- xlators/protocol/client/src/client-protocol.c | 44 +++++++++++++-------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'xlators/protocol/client') diff --git a/xlators/protocol/client/src/client-protocol.c b/xlators/protocol/client/src/client-protocol.c index d89da3fbc..3a11ef038 100644 --- a/xlators/protocol/client/src/client-protocol.c +++ b/xlators/protocol/client/src/client-protocol.c @@ -5479,30 +5479,28 @@ client_lookup_cbk (call_frame_t *frame, op_ret = -1; gf_stat_to_stat (&rsp->stat, &stbuf); - if (local->loc.ino != 1) { - ret = inode_ctx_get (inode, frame->this, &oldino); - if (oldino != stbuf.st_ino) { - if (oldino) - gf_log (frame->this->name, GF_LOG_DEBUG, - "LOOKUP %"PRId64"/%s (%s): " - "inode number changed from " - "%"PRId64" to %"PRId64, - local->loc.parent->ino, - local->loc.name, - local->loc.path, - oldino, stbuf.st_ino); + ret = inode_ctx_get (inode, frame->this, &oldino); + if (oldino != stbuf.st_ino) { + if (oldino) + gf_log (frame->this->name, GF_LOG_DEBUG, + "LOOKUP %"PRId64"/%s (%s): " + "inode number changed from " + "%"PRId64" to %"PRId64, + local->loc.parent->ino, + local->loc.name, + local->loc.path, + oldino, stbuf.st_ino); - ret = inode_ctx_put (inode, frame->this, - stbuf.st_ino); - if (ret < 0) { - gf_log (frame->this->name, GF_LOG_ERROR, - "LOOKUP %"PRId64"/%s (%s) : " - "failed to set remote inode " - "number to inode ctx", - local->loc.parent->ino, - local->loc.name, - local->loc.path); - } + ret = inode_ctx_put (inode, frame->this, + stbuf.st_ino); + if (ret < 0) { + gf_log (frame->this->name, GF_LOG_ERROR, + "LOOKUP %"PRId64"/%s (%s) : " + "failed to set remote inode " + "number to inode ctx", + local->loc.parent->ino, + local->loc.name, + local->loc.path); } } -- cgit