From b945e99a6c5a9ea623b2c9d0dbc1417ef8e59d4b Mon Sep 17 00:00:00 2001
From: Jiffin Tony Thottan <jthottan@redhat.com>
Date: Mon, 30 May 2016 17:39:02 +0530
Subject: [PATCH 20/86] Revert "gfapi/upcall: Use GF_CALLOC while allocating variables"
The above fix cause another regression for ganesha mount.
The struct which allocated here is a generic structure used by
both gfapi and FSAL_GLUSTER. So allocating it using GF_CALLOC()
is wrong to do. Therefore release that variable using "free()"
instead of GF_FREE()
So reverting that change and fix the same in another way.
This reverts commit 60089f6e16afe6760e0db536086cea5c9ddb5b43.
Please Note :
This is a hacky fix, so patch is sent only to downstream.
Clean fix requires changes in both ganesha and gfapi codes,
with in current time constraint which is difficult to achieve.
Please refer following ML for more details
http://post-office.corp.redhat.com/archives/nfs-ganesha/2016-May/msg00116.html
Label: DOWNSTREAM ONLY
Change-Id: I9240de5666df339c794466a9aa2acc285c173cf2
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/75429
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
---
api/src/glfs-handleops.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c
index f9b4ee9..221c29f 100644
--- a/api/src/glfs-handleops.c
+++ b/api/src/glfs-handleops.c
@@ -1891,8 +1891,7 @@ glfs_h_poll_cache_invalidation (struct glfs *fs,
goto out;
}
- up_inode_arg = GF_CALLOC (1, sizeof (struct callback_inode_arg),
- glfs_mt_upcall_entry_t);
+ up_inode_arg = calloc (1, sizeof (struct callback_inode_arg));
GF_VALIDATE_OR_GOTO ("glfs_h_poll_cache_invalidation",
up_inode_arg, out);
@@ -1958,7 +1957,8 @@ out:
/* Reset event_arg as well*/
up_arg->event_arg = NULL;
- GF_FREE (up_inode_arg);
+ free (up_inode_arg);
+ up_inode_arg = NULL;
}
return ret;
}
--
1.7.1