sysquotas_linux: fix inode limit setting, which is not depeding on blocksize
authorBjörn Jacke <bj@sernet.de>
Thu, 7 Feb 2019 02:35:01 +0000 (03:35 +0100)
committerBjoern Jacke <bjacke@samba.org>
Sun, 17 Feb 2019 12:33:12 +0000 (13:33 +0100)
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/lib/sysquotas_linux.c

index eebb1ad1f8c442ec4dc41450e59e4be250b83563..4415f519ce06f4b08d8960169d2158fc3b6400fe 100644 (file)
@@ -140,14 +140,12 @@ int sys_set_vfs_quota(const char *path, const char *bdev,
        if (bsize == dp->bsize) {
                D.dqb_bsoftlimit = dp->softlimit;
                D.dqb_bhardlimit = dp->hardlimit;
-               D.dqb_ihardlimit = dp->ihardlimit;
-               D.dqb_isoftlimit = dp->isoftlimit;
        } else {
                D.dqb_bsoftlimit = (dp->softlimit*dp->bsize)/bsize;
                D.dqb_bhardlimit = (dp->hardlimit*dp->bsize)/bsize;
-               D.dqb_ihardlimit = (dp->ihardlimit*dp->bsize)/bsize;
-               D.dqb_isoftlimit = (dp->isoftlimit*dp->bsize)/bsize;
        }
+       D.dqb_ihardlimit = dp->ihardlimit;
+       D.dqb_isoftlimit = dp->isoftlimit;
        D.dqb_valid = QIF_LIMITS;
 
        switch (qtype) {