summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2013-08-28 21:39:35 +0530
committerRaghavendra G <rgowdapp@redhat.com>2013-09-10 11:06:09 +0530
commitc1180f64f75d07e4f1cd480e0212e11d89c8bdfe (patch)
tree4e9e71c5ab9b445d26d9afc71441482f4b73e3e0
parent783370088ed26f0b7ff520a6a629649bdad2f82b (diff)
quotad: compare the entire volume_uuid with xlator name.
Current code compared only the first strlen (xlator_name) characters with volume_uuid. This can result in picking up a wrong subvol which has the first strlen (xlator_name) characters same as volume_uuid. Change-Id: I81bf251c0603ccfe2bd60b75d2e040f13b135669 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
-rw-r--r--xlators/features/quota/src/quotad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/quota/src/quotad.c b/xlators/features/quota/src/quotad.c
index 92fe9b45..219106f5 100644
--- a/xlators/features/quota/src/quotad.c
+++ b/xlators/features/quota/src/quotad.c
@@ -76,7 +76,7 @@ qd_find_subvol (xlator_t *this, char *volume_uuid)
if (dict_get_str(this->options, key, &optstr) < 0)
continue;
- if (strncmp (optstr, volume_uuid, strlen(optstr)) == 0) {
+ if (strcmp (optstr, volume_uuid) == 0) {
subvol = child->xlator;
break;
}