From 331e9e2051addfcc394c933a85046f450961e1af Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Thu, 4 Sep 2014 23:58:18 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/8601 Tested-by: Gluster Build System Reviewed-by: Shyamsundar Ranganathan --- libglusterfs/src/syncop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libglusterfs') 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; -- cgit