diff options
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/client/src/client-protocol.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/xlators/protocol/client/src/client-protocol.c b/xlators/protocol/client/src/client-protocol.c index d7ab797b6..d89da3fbc 100644 --- a/xlators/protocol/client/src/client-protocol.c +++ b/xlators/protocol/client/src/client-protocol.c @@ -1990,14 +1990,16 @@ client_statfs (call_frame_t *frame, } pathlen = STRLEN_0(loc->path); - - ret = inode_ctx_get (loc->inode, this, &ino); - if (loc->inode->ino && ret < 0) { - gf_log (this->name, GF_LOG_ERROR, - "STATFS %"PRId64" (%s): " - "failed to get remote inode number", - loc->inode->ino, loc->path); - } + + if (loc->inode) { + ret = inode_ctx_get (loc->inode, this, &ino); + if (loc->inode->ino && ret < 0) { + gf_log (this->name, GF_LOG_ERROR, + "STATFS %"PRId64" (%s): " + "failed to get remote inode number", + loc->inode->ino, loc->path); + } + } hdrlen = gf_hdr_len (req, pathlen); hdr = gf_hdr_new (req, pathlen); |