From 6790db81d6bf59c34ca89f901b34e9f81cbde1a5 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Mon, 3 Feb 2025 16:18:14 +0100 Subject: [PATCH] user-runtime-dir: correct quota size calculation Follow-up for b1c95fb2e9d11fc190017dec3d64f468f9d378bc Fixes #36245 --- src/login/user-runtime-dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3