summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-diskusage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-diskusage.c b/xlators/cluster/dht/src/dht-diskusage.c
index 830cf2d0e70..561e5d518cb 100644
--- a/xlators/cluster/dht/src/dht-diskusage.c
+++ b/xlators/cluster/dht/src/dht-diskusage.c
@@ -50,8 +50,9 @@ dht_du_info_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1)
goto out;
-
- percent = (statvfs->f_bfree * 100) / statvfs->f_blocks;
+
+ if (statvfs && statvfs->f_blocks)
+ percent = (statvfs->f_bfree * 100) / statvfs->f_blocks;
LOCK (&conf->subvolume_lock);
{