summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-quota.c5
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c22
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c5
3 files changed, 11 insertions, 21 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
index 1734d5e..d2fefef 100644
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
@@ -1755,6 +1755,11 @@ glusterd_op_quota(dict_t *dict, char **op_errstr, dict_t *rsp_dict)
volinfo->quota_xattr_version--;
ret = glusterd_store_volinfo(volinfo,
GLUSTERD_VOLINFO_VER_AC_INCREMENT);
+ if (ret) {
+ gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_VOLINFO_SET_FAIL,
+ "Failed to store volinfo for volume %s",
+ volinfo->volname);
+ }
}
ret = -1;
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 26984b6..2d99879 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -723,15 +723,8 @@ _storeslaves(dict_t *this, char *key, data_t *value, void *data)
GF_ASSERT(shandle->fd > 0);
GF_ASSERT(shandle->path);
GF_ASSERT(key);
- GF_ASSERT(value && value->data);
-
- if ((!shandle) || (shandle->fd <= 0) || (!shandle->path))
- return -1;
-
- if (!key)
- return -1;
- if (!value || !value->data)
- return -1;
+ GF_ASSERT(value);
+ GF_ASSERT(value->data);
gf_msg_debug(xl->name, 0, "Storing in volinfo:key= %s, val=%s", key,
value->data);
@@ -764,15 +757,8 @@ _storeopts(dict_t *this, char *key, data_t *value, void *data)
GF_ASSERT(shandle->fd > 0);
GF_ASSERT(shandle->path);
GF_ASSERT(key);
- GF_ASSERT(value && value->data);
-
- if ((!shandle) || (shandle->fd <= 0) || (!shandle->path))
- return -1;
-
- if (!key)
- return -1;
- if (!value || !value->data)
- return -1;
+ GF_ASSERT(value);
+ GF_ASSERT(value->data);
if (is_key_glusterd_hooks_friendly(key)) {
exists = 1;
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 9c00f6b..3c32cf9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -4725,7 +4725,7 @@ nfs_option_handler(volgen_graph_t *graph, struct volopt_map_entry *vme,
if (!volinfo || (volinfo->volname[0] == '\0'))
return 0;
- if (!vme || (vme->option[0] == '\0'))
+ if (!vme || !(vme->option))
return 0;
if (!strcmp(vme->option, "!rpc-auth.addr.*.allow")) {
@@ -4851,8 +4851,7 @@ nfs_option_handler(volgen_graph_t *graph, struct volopt_map_entry *vme,
return -1;
}
- if ((strcmp(vme->voltype, "nfs/server") == 0) &&
- (vme->option && vme->option[0] != '!')) {
+ if ((strcmp(vme->voltype, "nfs/server") == 0) && (vme->option[0] != '!')) {
ret = xlator_set_option(xl, vme->option, vme->value);
if (ret)
return -1;