summaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2009-04-19 18:40:43 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-19 19:46:47 +0200
commit613cbe3d4870429bf2e816d4bbe3146d157ee5c1 (patch)
tree52031a08d45201164ca6b8a126b3a0c4af2ecb43 /fs/namespace.c
parentRemove 'recurse into child resources' logic from 'reserve_region_with_split()' (diff)
downloadlinux-613cbe3d4870429bf2e816d4bbe3146d157ee5c1.tar.xz
linux-613cbe3d4870429bf2e816d4bbe3146d157ee5c1.zip
Don't set relatime when noatime is specified
Since commit 0a1c01c9477602ee8b44548a9405b2c1d587b5a2 ("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: Andi Kleen <ak@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index c6f54e4c4290..d9138f81ec10 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1920,8 +1920,9 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
if (data_page)
((char *)data_page)[PAGE_SIZE - 1] = 0;
- /* Default to relatime */
- mnt_flags |= MNT_RELATIME;
+ /* Default to relatime unless overriden */
+ if (!(flags & MS_NOATIME))
+ mnt_flags |= MNT_RELATIME;
/* Separate the per-mountpoint flags */
if (flags & MS_NOSUID)