From e9d20f0e1a17e0ef2f148a9b49d1cf9596cbe609 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Tue, 12 Jan 2016 12:13:15 +0530 Subject: snapview-client: remove check for parent inode type In lookup call back path, we are checking for parent inode type to make sure parent inode was set properly, so that next op on the inode can be successfuly completed. More info can be found at bugid 1297311 Change-Id: Ifb1b17f472f855f9b12088c3dd8328389d895e77 BUG: 1297311 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/13227 Reviewed-by: Avra Sengupta Tested-by: NetBSD Build System Reviewed-by: Rajesh Joseph --- .../features/snapview-client/src/snapview-client.c | 26 ---------------------- 1 file changed, 26 deletions(-) (limited to 'xlators/features/snapview-client') diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c index 4a2bdfbd301..dec462f1943 100644 --- a/xlators/features/snapview-client/src/snapview-client.c +++ b/xlators/features/snapview-client/src/snapview-client.c @@ -264,11 +264,9 @@ svc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, struct iatt *buf, dict_t *xdata, struct iatt *postparent) { svc_local_t *local = NULL; - inode_t *parent = NULL; xlator_t *subvolume = NULL; gf_boolean_t do_unwind = _gf_true; int inode_type = -1; - int parent_type = -1; int ret = -1; local = frame->local; @@ -330,27 +328,6 @@ svc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, goto out; } - if (local->loc.parent) - parent = inode_ref (local->loc.parent); - else { - parent = inode_parent (inode, NULL, NULL); - if (!parent && !gf_uuid_is_null (local->loc.pargfid)) { - parent = inode_find (inode->table, - local->loc.pargfid); - } - } - - if (!__is_root_gfid (buf->ia_gfid) && parent) { - ret = svc_inode_ctx_get (this, parent, &parent_type); - if (ret < 0) { - op_ret = -1; - op_errno = EINVAL; - gf_log (this->name, GF_LOG_WARNING, - "Error fetching parent context"); - goto out; - } - } - if (subvolume == FIRST_CHILD (this)) inode_type = NORMAL_INODE; else @@ -367,9 +344,6 @@ out: xdata, postparent); } - if (parent) - inode_unref (parent); - return 0; } -- cgit