Commit 0a1c01c9 authored by Matthew Garrett's avatar Matthew Garrett Committed by Linus Torvalds

Make relatime default

Change the default behaviour of the kernel to use relatime for all
filesystems. This can be overridden with the "strictatime" mount
option.
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d0adde57
...@@ -1920,6 +1920,9 @@ long do_mount(char *dev_name, char *dir_name, char *type_page, ...@@ -1920,6 +1920,9 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
if (data_page) if (data_page)
((char *)data_page)[PAGE_SIZE - 1] = 0; ((char *)data_page)[PAGE_SIZE - 1] = 0;
/* Default to relatime */
mnt_flags |= MNT_RELATIME;
/* Separate the per-mountpoint flags */ /* Separate the per-mountpoint flags */
if (flags & MS_NOSUID) if (flags & MS_NOSUID)
mnt_flags |= MNT_NOSUID; mnt_flags |= MNT_NOSUID;
...@@ -1931,8 +1934,6 @@ long do_mount(char *dev_name, char *dir_name, char *type_page, ...@@ -1931,8 +1934,6 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
mnt_flags |= MNT_NOATIME; mnt_flags |= MNT_NOATIME;
if (flags & MS_NODIRATIME) if (flags & MS_NODIRATIME)
mnt_flags |= MNT_NODIRATIME; mnt_flags |= MNT_NODIRATIME;
if (flags & MS_RELATIME)
mnt_flags |= MNT_RELATIME;
if (flags & MS_STRICTATIME) if (flags & MS_STRICTATIME)
mnt_flags &= ~(MNT_RELATIME | MNT_NOATIME); mnt_flags &= ~(MNT_RELATIME | MNT_NOATIME);
if (flags & MS_RDONLY) if (flags & MS_RDONLY)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment