From: Björn Jacke Date: Thu, 14 Feb 2019 11:09:38 +0000 (+0100) Subject: ntquotas: do not set inode limits when setting space quota X-Git-Tag: ldb-1.6.1~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc2cc68713bcf4d8752cd33776f0bf9e36a4e8e3;p=thirdparty%2Fsamba.git ntquotas: do not set inode limits when setting space quota we are supposed to set a space quota limit, we should not calculate an additional artifical inode limit out of that. Signed-off-by: Bjoern Jacke --- diff --git a/source3/smbd/ntquotas.c b/source3/smbd/ntquotas.c index 5622f1023a8..47633b682a8 100644 --- a/source3/smbd/ntquotas.c +++ b/source3/smbd/ntquotas.c @@ -57,18 +57,6 @@ static uint64_t limit_unix2nt(uint64_t in, uint64_t bsize) return ret; } -static uint64_t limit_blk2inodes(uint64_t in) -{ - uint64_t ret = (uint64_t)0; - - ret = (uint64_t)(in/2); - - if (ret == 0 && in != 0) - ret = (uint64_t)1; - - return ret; -} - NTSTATUS vfs_get_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, struct dom_sid *psid, SMB_NTQUOTA_STRUCT *qt) { @@ -146,9 +134,6 @@ int vfs_set_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, struct dom_sid D.hardlimit = limit_nt2unix(qt->hardlim,D.bsize); D.qflags = qt->qflags; - D.isoftlimit = limit_blk2inodes(D.softlimit); - D.ihardlimit = limit_blk2inodes(D.hardlimit); - if (psid && !sid_to_uid(psid, &id.uid)) { struct dom_sid_buf buf; DEBUG(0,("sid_to_uid: failed, SID[%s]\n",