]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
homed: don't drop caches on activation
authorLennart Poettering <lennart@poettering.net>
Fri, 22 Oct 2021 22:42:54 +0000 (00:42 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 23 Oct 2021 08:26:26 +0000 (17:26 +0900)
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

src/home/homework-cifs.c
src/home/homework-directory.c
src/home/homework-luks.c

index 0a95b886b360b48d665d3603669b6844bf78317f..3db18130e39a3dfd4d22bda7a20c79e748a57461 100644 (file)
@@ -133,6 +133,7 @@ int home_activate_cifs(
                 return r;
 
         setup->undo_mount = false;
+        setup->do_drop_caches = false;
 
         log_info("Everything completed.");
 
index b95896d45b2bad2bb9a30a7af81c5be74f6ee5b1..8f2f512b1bba0882d11ebada53c8de0265ee394e 100644 (file)
@@ -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);
index 53598165eee793cfdb1463d9a332585122d2c456..e09d40f66b6ca8b88b356e1b76b2b001796e7575 100644 (file)
@@ -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.");