summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client
diff options
context:
space:
mode:
authorBasavanagowda Kanur <gowda@gluster.com>2009-04-17 14:19:18 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-04-17 14:47:53 +0530
commit4a632ea96be3012c583165865bbde392f99a327b (patch)
tree0e352c4d12b83ce1c1c321fe7dbaea508345ac66 /xlators/protocol/client
parent6bd53940d198e55780cbc7d8678da6d67df80265 (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>
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r--xlators/protocol/client/src/client-protocol.c44
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 d89da3fbc85..3a11ef03882 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);
}
}