[systemd-devel] [PATCH 2/2] logind: Avoid unnecesary rewrite of user file when switching sessions of the same user.
Colin Guthrie
colin at mageia.org
Mon Sep 3 17:37:28 PDT 2012
---
src/login/logind-seat.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
index 0457121..9c7cc1f 100644
--- a/src/login/logind-seat.c
+++ b/src/login/logind-seat.c
@@ -261,7 +261,8 @@ int seat_set_active(Seat *s, Session *session) {
if (old_active) {
session_save(old_active);
- user_save(old_active->user);
+ if (!session || session->user != old_active->user)
+ user_save(old_active->user);
}
return 0;
--
1.7.12
More information about the systemd-devel
mailing list