From: Mike Yuan Date: Mon, 3 Feb 2025 15:18:14 +0000 (+0100) Subject: user-runtime-dir: correct quota size calculation X-Git-Tag: v258-rc1~969^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6790db81d6bf59c34ca89f901b34e9f81cbde1a5;p=thirdparty%2Fsystemd.git user-runtime-dir: correct quota size calculation Follow-up for b1c95fb2e9d11fc190017dec3d64f468f9d378bc Fixes #36245 --- diff --git a/src/login/user-runtime-dir.c b/src/login/user-runtime-dir.c index fb33fdd9397..451e181cd86 100644 --- a/src/login/user-runtime-dir.c +++ b/src/login/user-runtime-dir.c @@ -262,7 +262,7 @@ static int apply_tmpfs_quota( uint64_t v = (scale == 0) ? 0 : (scale == UINT32_MAX) ? UINT64_MAX : - (uint64_t) ((double) (sfs.f_blocks * sfs.f_frsize) / scale * UINT32_MAX); + (uint64_t) ((double) (sfs.f_blocks * sfs.f_frsize) * scale / UINT32_MAX); v = MIN(v, limit); v /= QIF_DQBLKSIZE;