From: Lennart Poettering Date: Fri, 22 Oct 2021 22:42:54 +0000 (+0200) Subject: homed: don't drop caches on activation X-Git-Tag: v250-rc1~441 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa0379f16fc32f66b37fbcc9fc33c1afa22a61a8;p=thirdparty%2Fsystemd.git homed: don't drop caches on activation We should drop caches if we are configured to do so in all cases where we are done with home dir operations: except if that operation is activation, because in that case we are not destroying anything, but leaving it on. Hence, turn off the flag that reminds us that we should drop caches before exiting, once activation completed fully, Follow-up for 86019efa4416d7b548cab321c15bc22a65463786 --- diff --git a/src/home/homework-cifs.c b/src/home/homework-cifs.c index 0a95b886b36..3db18130e39 100644 --- a/src/home/homework-cifs.c +++ b/src/home/homework-cifs.c @@ -133,6 +133,7 @@ int home_activate_cifs( return r; setup->undo_mount = false; + setup->do_drop_caches = false; log_info("Everything completed."); diff --git a/src/home/homework-directory.c b/src/home/homework-directory.c index b95896d45b2..8f2f512b1bb 100644 --- a/src/home/homework-directory.c +++ b/src/home/homework-directory.c @@ -72,6 +72,8 @@ int home_activate_directory( return r; } + setup->do_drop_caches = false; + log_info("Everything completed."); *ret_home = TAKE_PTR(new_home); diff --git a/src/home/homework-luks.c b/src/home/homework-luks.c index 53598165eee..e09d40f66b6 100644 --- a/src/home/homework-luks.c +++ b/src/home/homework-luks.c @@ -1475,6 +1475,7 @@ int home_activate_luks( setup->undo_dm = false; setup->do_offline_fallocate = false; setup->do_mark_clean = false; + setup->do_drop_caches = false; log_info("Everything completed.");