summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/snapview-client/src/snapview-client.c2
-rw-r--r--xlators/features/snapview-server/src/snapview-server.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c
index d9bd56814b..63ed160bd7 100644
--- a/xlators/features/snapview-client/src/snapview-client.c
+++ b/xlators/features/snapview-client/src/snapview-client.c
@@ -1716,7 +1716,7 @@ gf_svc_readdirp_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
out:
SVC_STACK_UNWIND (readdirp, frame, op_ret, op_errno, &entries,
- local->xdata);
+ local ? local->xdata : NULL);
gf_dirent_free (&entries);
diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c
index 22b0e1c650..8fee435de6 100644
--- a/xlators/features/snapview-server/src/snapview-server.c
+++ b/xlators/features/snapview-server/src/snapview-server.c
@@ -58,10 +58,12 @@ svs_lookup_entry_point (xlator_t *this, loc_t *loc, inode_t *parent,
*op_errno = ENOMEM;
goto out;
}
+
gf_uuid_copy (inode_ctx->pargfid, loc->pargfid);
memcpy (&inode_ctx->buf, buf, sizeof (*buf));
inode_ctx->type = SNAP_VIEW_ENTRY_POINT_INODE;
} else {
+ inode_ctx = svs_inode_ctx_get (this, loc->inode);
if (inode_ctx) {
memcpy (buf, &inode_ctx->buf, sizeof (*buf));
svs_iatt_fill (inode_ctx->pargfid, postparent);