summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-rw-r--r--xlators/cluster/dht/src/dht-common.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index f5411f406d9..9d0e30ae461 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -6040,28 +6040,17 @@ dht_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
local->op_ret = 0;
- switch (local->quota_deem_statfs) {
- case _gf_true:
- if (event == _gf_true)
+ if (local->quota_deem_statfs) {
+ if (event == _gf_true) {
action = qdstatfs_action_COMPARE;
- else
+ } else {
action = qdstatfs_action_NEGLECT;
- break;
-
- case _gf_false:
+ }
+ } else {
if (event == _gf_true) {
action = qdstatfs_action_REPLACE;
local->quota_deem_statfs = _gf_true;
}
- break;
-
- default:
- gf_msg (this->name, GF_LOG_ERROR, 0,
- DHT_MSG_INVALID_VALUE,
- "Encountered third "
- "value for boolean variable %d",
- local->quota_deem_statfs);
- break;
}
if (local->quota_deem_statfs) {