Commit 613cbe3d authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

Don't set relatime when noatime is specified

Since commit 0a1c01c9 ("Make relatime
default") when a file system is mounted explicitely with noatime it gets
both the MNT_RELATIME and MNT_NOATIME bits set.

This shows up like this in /proc/mounts:

  /dev/xxx /yyy ext3 rw,noatime,relatime,errors=continue,data=writeback 0 0

That looks strange.  The VFS uses noatime in this case, but both flags
are set.  So it's more a cosmetic issue, but still better to fix.

Cc: mjg@redhat.com
Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ff54250a
...@@ -1920,7 +1920,8 @@ long do_mount(char *dev_name, char *dir_name, char *type_page, ...@@ -1920,7 +1920,8 @@ 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 */ /* Default to relatime unless overriden */
if (!(flags & MS_NOATIME))
mnt_flags |= MNT_RELATIME; mnt_flags |= MNT_RELATIME;
/* Separate the per-mountpoint flags */ /* Separate the per-mountpoint flags */
......
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