diff options
author | Kay Sievers <kay@vrfy.org> | 2012-04-11 21:33:12 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-04-11 21:40:25 +0200 |
commit | e5f3d1ba124f14477d6b5434982d7d44a472a66f (patch) | |
tree | eefcb33bd90b3619534fa4d0b11fdd1b8bd41c65 /src/tmpfiles.c | |
parent | 6bb92a169e8a65e7def5545798001e0dbecc7d4f (diff) |
tmpfiles: open directories with O_NOATIME to preserve timestamp
Before:
# stat /tmp/pulse-Du5ectm60QYM | grep 'Access: 20'
Access: 2012-04-11 21:32:48.444920237 +0200
# systemd-tmpfiles --clean
# stat /tmp/pulse-Du5ectm60QYM | grep 'Access: 20'
Access: 2012-04-11 21:36:27.628925459 +0200
After:
# stat /tmp/pulse-Du5ectm60QYM | grep 'Access: 20'
Access: 2012-04-11 21:32:48.444920237 +0200
# ./systemd-tmpfiles --clean
# stat /tmp/pulse-Du5ectm60QYM | grep 'Access: 20'
Access: 2012-04-11 21:32:48.444920237 +0200
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=810257
Diffstat (limited to 'src/tmpfiles.c')
-rw-r--r-- | src/tmpfiles.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tmpfiles.c b/src/tmpfiles.c index 5e85e37411..c5f6fc00b3 100644 --- a/src/tmpfiles.c +++ b/src/tmpfiles.c @@ -269,7 +269,7 @@ static int dir_cleanup( DIR *sub_dir; int q; - sub_dir = xopendirat(dirfd(d), dent->d_name, O_NOFOLLOW); + sub_dir = xopendirat(dirfd(d), dent->d_name, O_NOFOLLOW|O_NOATIME); if (sub_dir == NULL) { if (errno != ENOENT) { log_error("opendir(%s/%s) failed: %m", p, dent->d_name); |