summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2014-09-19 10:04:22 -0400
committerVijay Bellur <vbellur@redhat.com>2014-09-20 01:54:55 -0700
commit10d45b9783b751c1f78b670281fd1d57ae377642 (patch)
tree730792cc7f8bbe3271afc6f9585fb0f2cb83fc07 /libglusterfs
parentb98bfbc93b420ad47ad5008e738923bce683fc98 (diff)
syncop: Invoke dict_unref() in inodelk only if dictionary is not NULL
In the absence of this check, logs can get flooded with messages like this when rebalance is run: [2014-09-04 17:48:07.148262] W [dict.c:480:dict_unref] (-->/lib64/libc.so.6() [0x30daa47a00] (-->/usr/local/lib/libglusterfs.so.0(synctask_wrap+0x12) [0x7fa20b7c6ec2] (-->/usr/local/lib/glusterfs/3.7dev/xlator/cluster/distribute.so(dht_migrate_file+0x23f) [0x7fa200fdb58f]))) 0-dict: dict is NULL Change-Id: I4c93e4485293b35d86ba07df4d583d2758ec3f49 BUG: 1138395 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on-master: http://review.gluster.org/8601 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-on: http://review.gluster.org/8782
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/syncop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
index c0a85b2830c..cc25cd58815 100644
--- a/libglusterfs/src/syncop.c
+++ b/libglusterfs/src/syncop.c
@@ -2361,8 +2361,10 @@ syncop_inodelk (xlator_t *subvol, const char *volume, loc_t *loc, int32_t cmd,
if (xdata_rsp)
*xdata_rsp = args.xdata;
- else
- dict_unref (args.xdata);
+ else {
+ if (args.xdata)
+ dict_unref (args.xdata);
+ }
if (args.op_ret < 0)
return -args.op_errno;