From 43ad199802299096d4a6ea7ce99a5198840bd087 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 30 May 2024 09:34:26 +0200 Subject: [PATCH] homed: drop caches harder echoing "2" is apparently not enough to erase inodes/dentrys from memory, hence use "3", which seems to work. Fixes: #32596 --- src/home/homework.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/home/homework.c b/src/home/homework.c index af8bcd72a4..e10922cefd 100644 --- a/src/home/homework.c +++ b/src/home/homework.c @@ -300,10 +300,10 @@ static void drop_caches_now(void) { int r; /* Drop file system caches now. See https://docs.kernel.org/admin-guide/sysctl/vm.html - * for details. We write "2" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but + * for details. We write "3" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but * not more. */ - r = write_string_file("/proc/sys/vm/drop_caches", "2\n", WRITE_STRING_FILE_DISABLE_BUFFER); + r = write_string_file("/proc/sys/vm/drop_caches", "3\n", WRITE_STRING_FILE_DISABLE_BUFFER); if (r < 0) log_warning_errno(r, "Failed to drop caches, ignoring: %m"); else -- 2.25.1