From d703745493e7cf5eec41875dc5c786d29ef2de03 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Tue, 30 Jun 2015 11:22:31 +0530 Subject: ctr:Avoid assertion failure in lookup in ctr_lookup, the loc variable need not be comes with pargfid, though there is a parent for the inode. The same for loc->name also. From this patch, we will generate loc->name from loc->path Back port of : >Change-Id: I24a79554748139504ec09f77930f8208d3805977 >BUG: 1236128 >Signed-off-by: Mohammed Rafi KC >Reviewed-on: http://review.gluster.org/11459 >Tested-by: NetBSD Build System >Tested-by: Gluster Build System >Reviewed-by: Joseph Fernandes (cherry picked from commit 2e44d1580497eb75f325ad3104249a425ddf592a) Change-Id: Ia926bee45059ec97bbe5120f19999b9d5a71aa88 BUG: 1254439 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/11947 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Dan Lambright Tested-by: Dan Lambright --- xlators/features/changetimerecorder/src/ctr-helper.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xlators/features/changetimerecorder/src/ctr-helper.h') diff --git a/xlators/features/changetimerecorder/src/ctr-helper.h b/xlators/features/changetimerecorder/src/ctr-helper.h index 82a0c8bc93c..2a1f5203d9b 100644 --- a/xlators/features/changetimerecorder/src/ctr-helper.h +++ b/xlators/features/changetimerecorder/src/ctr-helper.h @@ -185,12 +185,12 @@ do {\ } while (0) /*Clear and fill the ctr_link_context with values*/ -#define FILL_CTR_LINK_CX(ctr_link_cx, _pargfid, _basename, _basepath)\ +#define FILL_CTR_LINK_CX(ctr_link_cx, _pargfid, _basename, _basepath, label)\ do {\ - GF_ASSERT (ctr_link_cx);\ - GF_ASSERT (_pargfid);\ - GF_ASSERT (_basename);\ - GF_ASSERT (_basepath);\ + GF_VALIDATE_OR_GOTO ("ctr", ctr_link_cx, label);\ + GF_VALIDATE_OR_GOTO ("ctr", _pargfid, label);\ + GF_VALIDATE_OR_GOTO ("ctr", _basename, label);\ + GF_VALIDATE_OR_GOTO ("ctr", _basepath, label);\ memset (ctr_link_cx, 0, sizeof (*ctr_link_cx));\ ctr_link_cx->pargfid = &_pargfid;\ ctr_link_cx->basename = _basename;\ -- cgit