]> git.ipfire.org Git - people/ms/linux.git/blobdiff - fs/namespace.c
[PATCH] per-mountpoint noatime/nodiratime
[people/ms/linux.git] / fs / namespace.c
index f0e353f5bc3083fd38dcf19af5d8e8437e7c872e..2ca6145f43d6b047a4b98eabab9e1ccfd447ba81 100644 (file)
@@ -355,14 +355,14 @@ static int show_vfsmnt(struct seq_file *m, void *v)
                { MS_SYNCHRONOUS, ",sync" },
                { MS_DIRSYNC, ",dirsync" },
                { MS_MANDLOCK, ",mand" },
-               { MS_NOATIME, ",noatime" },
-               { MS_NODIRATIME, ",nodiratime" },
                { 0, NULL }
        };
        static struct proc_fs_info mnt_info[] = {
                { MNT_NOSUID, ",nosuid" },
                { MNT_NODEV, ",nodev" },
                { MNT_NOEXEC, ",noexec" },
+               { MNT_NOATIME, ",noatime" },
+               { MNT_NODIRATIME, ",nodiratime" },
                { 0, NULL }
        };
        struct proc_fs_info *fs_infop;
@@ -1286,7 +1286,13 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
                mnt_flags |= MNT_NODEV;
        if (flags & MS_NOEXEC)
                mnt_flags |= MNT_NOEXEC;
-       flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE);
+       if (flags & MS_NOATIME)
+               mnt_flags |= MNT_NOATIME;
+       if (flags & MS_NODIRATIME)
+               mnt_flags |= MNT_NODIRATIME;
+
+       flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE |
+                  MS_NOATIME | MS_NODIRATIME);
 
        /* ... and get the mountpoint */
        retval = path_lookup(dir_name, LOOKUP_FOLLOW, &nd);