1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-25 10:04:04 +03:00

journald: make use of CLAMP() in cache_space_refresh()

This commit is contained in:
Franck Bui 2022-03-18 08:12:48 +01:00 committed by Lennart Poettering
parent 4bb37be07b
commit 6d7afa3b58

View File

@ -157,7 +157,7 @@ static int cache_space_refresh(Server *s, JournalStorage *storage) {
avail = LESS_BY(vfs_avail, metrics->keep_free);
space->limit = MIN(MAX(vfs_used + avail, metrics->min_use), metrics->max_use);
space->limit = CLAMP(vfs_used + avail, metrics->min_use, metrics->max_use);
space->available = LESS_BY(space->limit, vfs_used);
space->timestamp = ts;
return 1;