summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server.c
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2015-12-16 05:45:03 -0500
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-05-19 02:28:07 -0700
commit8facd588f20ef8305b6f6b53da0f6d54d300093b (patch)
tree066a5c1d7f7bf4c56685be859ca5c256e4d8c1e8 /xlators/protocol/server/src/server.c
parent005d18a623dc49397e2a83a7fb80607ae0a9aed9 (diff)
upcall: pass dict with xattrs on xattr invalidation
In case of xattr invalidation, return a dict containing the updated xattrs. [ndevos: move chunks to change 12995 and only address the xattrs-dict here] Change-Id: I8733f06a519a9a0f24be1bb4b2c38c9c9dce0ce2 BUG: 1211863 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/12996 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: soumya k <skoduri@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src/server.c')
-rw-r--r--xlators/protocol/server/src/server.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 99874acae72..0e8b28899bc 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -1200,8 +1200,10 @@ server_process_event_upcall (xlator_t *this, void *data)
switch (upcall_data->event_type) {
case GF_UPCALL_CACHE_INVALIDATION:
- gf_proto_cache_invalidation_from_upcall (&gf_c_req,
- upcall_data);
+ ret = gf_proto_cache_invalidation_from_upcall (this, &gf_c_req,
+ upcall_data);
+ if (ret < 0)
+ goto out;
up_req = &gf_c_req;
cbk_procnum = GF_CBK_CACHE_INVALIDATION;
@@ -1243,6 +1245,9 @@ server_process_event_upcall (xlator_t *this, void *data)
pthread_mutex_unlock (&conf->mutex);
ret = 0;
out:
+ if ((gf_c_req.xdata).xdata_val)
+ GF_FREE ((gf_c_req.xdata).xdata_val);
+
return ret;
}