summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2014-09-04 23:58:18 +0530
committerVijay Bellur <vbellur@redhat.com>2014-09-17 07:13:50 -0700
commit331e9e2051addfcc394c933a85046f450961e1af (patch)
tree58cb79077cbe4722593eea4ae3bde0f2d9953b69
parent6f5bb1bfc520a91d70a02a9c13104c798e2dba14 (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: 1130888 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/8601 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
-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;