From bcecb676b4f8ee1c8e16c47a711fee86859d84bf Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 6 Dec 2015 15:39:53 +0200 Subject: [PATCH] quota-fs: File count limits with NetBSD shouldn't be multiplied by DEV_BSIZE --- src/plugins/quota/quota-fs.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/quota/quota-fs.c b/src/plugins/quota/quota-fs.c index b9e207a8cb..b4abf43c79 100644 --- a/src/plugins/quota/quota-fs.c +++ b/src/plugins/quota/quota-fs.c @@ -697,8 +697,13 @@ fs_quota_get_netbsd(struct fs_quota_root *root, bool group, bool bytes, root->mount->mount_path); ret = -1; } else { - *value_r = qv.qv_usage * DEV_BSIZE; - *limit_r = qv.qv_softlimit * DEV_BSIZE; + if (bytes) { + *value_r = qv.qv_usage * DEV_BSIZE; + *limit_r = qv.qv_softlimit * DEV_BSIZE; + } else { + *value_r = qv.qv_usage; + *limit_r = qv.qv_softlimit; + } ret = 1; } quota_close(qh); -- 2.47.3