From a8d19874e95519198d305283e7a58ecc64947e07 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 Back port of> >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 Change-Id: I347aa0e42ae35491246747dee50724fc91964611 BUG: 1306131 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/13412 NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Smoke: Gluster 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/src') diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c index 3df327e9c13..19d06f8d65a 100644 --- a/xlators/features/snapview-client/src/snapview-client.c +++ b/xlators/features/snapview-client/src/snapview-client.c @@ -269,11 +269,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; @@ -335,27 +333,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 @@ -372,9 +349,6 @@ out: xdata, postparent); } - if (parent) - inode_unref (parent); - return 0; } -- cgit