12a457
From 61acb451878a41121281a4eafcee7601056fe37d Mon Sep 17 00:00:00 2001
12a457
From: Kotresh HR <khiremat@redhat.com>
12a457
Date: Mon, 21 Mar 2016 12:01:47 +0530
12a457
Subject: [PATCH 154/158] features/marker: Fix dict_get errors when key is NULL
12a457
12a457
Backport of:
12a457
master:
12a457
>BUG: 1319581
12a457
>Reviewed-on: http://review.gluster.org/13793
12a457
12a457
release-3.7:
12a457
>BUG: 1332074
12a457
>Reviewed-on: http://review.gluster.org/14144
12a457
12a457
BUG: 1335505
12a457
Change-Id: I73f6443a24518008869048b85602ff019009e420
12a457
Signed-off-by: Kotresh HR <khiremat@redhat.com>
12a457
Reviewed-on: https://code.engineering.redhat.com/gerrit/74369
12a457
Reviewed-by: Venky Shankar <vshankar@redhat.com>
12a457
Tested-by: Venky Shankar <vshankar@redhat.com>
12a457
---
12a457
 libglusterfs/src/glusterfs.h         |    1 +
12a457
 xlators/features/marker/src/marker.c |    6 +++---
12a457
 2 files changed, 4 insertions(+), 3 deletions(-)
12a457
12a457
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
12a457
index 34c0361..c8c4590 100644
12a457
--- a/libglusterfs/src/glusterfs.h
12a457
+++ b/libglusterfs/src/glusterfs.h
12a457
@@ -159,6 +159,7 @@
12a457
 #define GLUSTERFS_INODELK_DOM_COUNT "glusterfs.inodelk-dom-count"
12a457
 #define GFID_TO_PATH_KEY "glusterfs.gfid2path"
12a457
 #define GF_XATTR_STIME_PATTERN "trusted.glusterfs.*.stime"
12a457
+#define GF_XATTR_XTIME_PATTERN "trusted.glusterfs.*.xtime"
12a457
 #define GF_XATTR_TRIGGER_SYNC "glusterfs.geo-rep.trigger-sync"
12a457
 
12a457
 /* quota xattrs */
12a457
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
12a457
index 10bf531..6a1952c 100644
12a457
--- a/xlators/features/marker/src/marker.c
12a457
+++ b/xlators/features/marker/src/marker.c
12a457
@@ -424,10 +424,10 @@ marker_filter_gsyncd_xattrs (call_frame_t *frame,
12a457
 
12a457
         priv = this->private;
12a457
         GF_ASSERT (priv);
12a457
+        GF_ASSERT (frame);
12a457
 
12a457
-        if (frame->root->pid != GF_CLIENT_PID_GSYNCD &&
12a457
-            dict_get(xattrs, priv->marker_xattr)) {
12a457
-                dict_del (xattrs, priv->marker_xattr);
12a457
+        if (xattrs && frame->root->pid != GF_CLIENT_PID_GSYNCD) {
12a457
+                GF_REMOVE_INTERNAL_XATTR (GF_XATTR_XTIME_PATTERN, xattrs);
12a457
         }
12a457
         return;
12a457
 }
12a457
-- 
12a457
1.7.1
12a457