diff options
| author | Rajesh Joseph <rjoseph@redhat.com> | 2016-05-24 19:14:41 +0530 | 
|---|---|---|
| committer | Niels de Vos <ndevos@redhat.com> | 2016-08-22 01:53:05 -0700 | 
| commit | 6fde5e3411d44c752d81006d35f19e92e23441af (patch) | |
| tree | d3a8abec53974da72cb36e546535ce147bcfa980 | |
| parent | c23a651b7e9fce8a51e3d9656cc64a49ff42aef7 (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
> 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>
(cherry picked from commit edcc6a4ef4f39d5e3073195d45011e3cdfa7c091)
BUG: 1367297
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Change-Id: I5c3f17633ca88e5b6f40d4acf14a09e14b7ef62b
Reviewed-on: http://review.gluster.org/15170
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Tested-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
| -rw-r--r-- | xlators/features/snapview-client/src/snapview-client.c | 8 | 
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 76b4bc3b7f4..6eb7cc071c2 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");  | 
