summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajesh Joseph <rjoseph@redhat.com>2016-05-24 19:14:41 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-05-25 07:23:37 -0700
commitedcc6a4ef4f39d5e3073195d45011e3cdfa7c091 (patch)
treedfc8dfdb513a9118ef35880b99001773d5c7e81d
parentdca1c08c6384e34403d8b5ad6eaf0931529168ac (diff)
snapshot/uss: client log is filled with "invalid argument: inode" error
svc_inode_ctx_get is called even if inode is NULL. We should not call this function if inode is NULL Change-Id: I5c3f17633ca88e5b6f40d4acf14a09e14b7ef62b BUG: 1339149 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/14525 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
-rw-r--r--xlators/features/snapview-client/src/snapview-client.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c
index 218d178f65f..d16f10e2991 100644
--- a/xlators/features/snapview-client/src/snapview-client.c
+++ b/xlators/features/snapview-client/src/snapview-client.c
@@ -287,12 +287,16 @@ gf_svc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
? GF_LOG_DEBUG:GF_LOG_ERROR,
"Lookup failed on snapview graph with error %s",
strerror (op_errno));
+ goto out;
}
if ((op_errno == ENOENT || op_errno == ESTALE) &&
!gf_uuid_is_null (local->loc.gfid)) {
- ret = svc_inode_ctx_get (this, inode, &inode_type);
- if (ret < 0 && subvolume == FIRST_CHILD (this)) {
+ if (inode != NULL)
+ ret = svc_inode_ctx_get (this, inode,
+ &inode_type);
+
+ if (ret < 0 || inode == NULL) {
gf_log (this->name, GF_LOG_DEBUG,
"Lookup on normal graph failed. "
"Sending lookup to snapview-server");