diff options
author | Kotresh HR <khiremat@redhat.com> | 2016-03-21 12:01:47 +0530 |
---|---|---|
committer | Venky Shankar <vshankar@redhat.com> | 2016-04-21 04:37:39 -0700 |
commit | fb55cf6aea208b8f493adc011b3b0a0d734cc8a1 (patch) | |
tree | 92aeb7f3e41431633d177a11290e360cbc728876 | |
parent | f8a6cd1d2715fc13f130b7c76d8aea75de8b5133 (diff) |
features/marker: Fix dict_get errors when key is NULL
Change-Id: I25e497459441334c13af77b3fec83c42a7a92ac4
BUG: 1319581
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/13793
Smoke: Gluster Build System <jenkins@build.gluster.com>
Tested-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
-rw-r--r-- | libglusterfs/src/glusterfs.h | 1 | ||||
-rw-r--r-- | xlators/features/marker/src/marker.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index bcd84952f78..97331fdef17 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -151,6 +151,7 @@ #define GLUSTERFS_INODELK_DOM_COUNT "glusterfs.inodelk-dom-count" #define GFID_TO_PATH_KEY "glusterfs.gfid2path" #define GF_XATTR_STIME_PATTERN "trusted.glusterfs.*.stime" +#define GF_XATTR_XTIME_PATTERN "trusted.glusterfs.*.xtime" #define GF_XATTR_TRIGGER_SYNC "glusterfs.geo-rep.trigger-sync" /* quota xattrs */ diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index a1da66bf4e3..e0e7c9857e6 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -422,10 +422,10 @@ marker_filter_gsyncd_xattrs (call_frame_t *frame, priv = this->private; GF_ASSERT (priv); + GF_ASSERT (frame); - if (frame->root->pid != GF_CLIENT_PID_GSYNCD && - dict_get(xattrs, priv->marker_xattr)) { - dict_del (xattrs, priv->marker_xattr); + if (xattrs && frame->root->pid != GF_CLIENT_PID_GSYNCD) { + GF_REMOVE_INTERNAL_XATTR (GF_XATTR_XTIME_PATTERN, xattrs); } return; } |