diff options
author | Basavanagowda Kanur <gowda@gluster.com> | 2009-04-17 14:19:18 +0530 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-17 14:47:53 +0530 |
commit | 4a632ea96be3012c583165865bbde392f99a327b (patch) | |
tree | 0e352c4d12b83ce1c1c321fe7dbaea508345ac66 | |
parent | 6bd53940d198e55780cbc7d8678da6d67df80265 (diff) |
protocol/client - set remote inode number in inode context for root inode also, during lookup_cbk().
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
-rw-r--r-- | xlators/protocol/client/src/client-protocol.c | 44 |
1 files changed, 21 insertions, 23 deletions
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); } } |