summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2015-12-24 15:22:05 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-12-28 23:26:29 -0800
commit4c1b66720121ca97ccfac3e09f93519f2f07ddfd (patch)
tree462478ff7135e085dcba644bf79140cc31cede3f /xlators/cluster
parente4de816ae126b62906afcc1ce1216500b517e222 (diff)
afr: Fix excessive logging in afr_accuse_smallfiles()
Commit 2b7226f9d3470d8fe4c98c1fddb06e7f641e364d did not check for the validity of a dict before doing a dict_get. Fix that. Change-Id: Ie21f4da19256b17196f242cd8fd5bb76b0a69c1e BUG: 1294053 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/13077 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/afr/src/afr-common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index e6b43447abd..9be3670d380 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -637,7 +637,8 @@ afr_accuse_smallfiles (xlator_t *this, struct afr_reply *replies,
priv = this->private;
for (i = 0; i < priv->child_count; i++) {
- if (dict_get (replies[i].xdata, GLUSTERFS_BAD_INODE))
+ if (replies[i].valid && replies[i].xdata &&
+ dict_get (replies[i].xdata, GLUSTERFS_BAD_INODE))
continue;
if (data_accused[i])
continue;