diff options
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 228d8c4bfd18..f0e753097353 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -614,9 +614,11 @@ static inline void __mntput(struct vfsmount *mnt) | |||
614 | */ | 614 | */ |
615 | for_each_possible_cpu(cpu) { | 615 | for_each_possible_cpu(cpu) { |
616 | struct mnt_writer *cpu_writer = &per_cpu(mnt_writers, cpu); | 616 | struct mnt_writer *cpu_writer = &per_cpu(mnt_writers, cpu); |
617 | if (cpu_writer->mnt != mnt) | ||
618 | continue; | ||
619 | spin_lock(&cpu_writer->lock); | 617 | spin_lock(&cpu_writer->lock); |
618 | if (cpu_writer->mnt != mnt) { | ||
619 | spin_unlock(&cpu_writer->lock); | ||
620 | continue; | ||
621 | } | ||
620 | atomic_add(cpu_writer->count, &mnt->__mnt_writers); | 622 | atomic_add(cpu_writer->count, &mnt->__mnt_writers); |
621 | cpu_writer->count = 0; | 623 | cpu_writer->count = 0; |
622 | /* | 624 | /* |
@@ -778,6 +780,7 @@ static void show_mnt_opts(struct seq_file *m, struct vfsmount *mnt) | |||
778 | { MNT_NOATIME, ",noatime" }, | 780 | { MNT_NOATIME, ",noatime" }, |
779 | { MNT_NODIRATIME, ",nodiratime" }, | 781 | { MNT_NODIRATIME, ",nodiratime" }, |
780 | { MNT_RELATIME, ",relatime" }, | 782 | { MNT_RELATIME, ",relatime" }, |
783 | { MNT_STRICTATIME, ",strictatime" }, | ||
781 | { 0, NULL } | 784 | { 0, NULL } |
782 | }; | 785 | }; |
783 | const struct proc_fs_info *fs_infop; | 786 | const struct proc_fs_info *fs_infop; |
@@ -1917,6 +1920,9 @@ long do_mount(char *dev_name, char *dir_name, char *type_page, | |||
1917 | if (data_page) | 1920 | if (data_page) |
1918 | ((char *)data_page)[PAGE_SIZE - 1] = 0; | 1921 | ((char *)data_page)[PAGE_SIZE - 1] = 0; |
1919 | 1922 | ||
1923 | /* Default to relatime */ | ||
1924 | mnt_flags |= MNT_RELATIME; | ||
1925 | |||
1920 | /* Separate the per-mountpoint flags */ | 1926 | /* Separate the per-mountpoint flags */ |
1921 | if (flags & MS_NOSUID) | 1927 | if (flags & MS_NOSUID) |
1922 | mnt_flags |= MNT_NOSUID; | 1928 | mnt_flags |= MNT_NOSUID; |
@@ -1928,13 +1934,14 @@ long do_mount(char *dev_name, char *dir_name, char *type_page, | |||
1928 | mnt_flags |= MNT_NOATIME; | 1934 | mnt_flags |= MNT_NOATIME; |
1929 | if (flags & MS_NODIRATIME) | 1935 | if (flags & MS_NODIRATIME) |
1930 | mnt_flags |= MNT_NODIRATIME; | 1936 | mnt_flags |= MNT_NODIRATIME; |
1931 | if (flags & MS_RELATIME) | 1937 | if (flags & MS_STRICTATIME) |
1932 | mnt_flags |= MNT_RELATIME; | 1938 | mnt_flags &= ~(MNT_RELATIME | MNT_NOATIME); |
1933 | if (flags & MS_RDONLY) | 1939 | if (flags & MS_RDONLY) |
1934 | mnt_flags |= MNT_READONLY; | 1940 | mnt_flags |= MNT_READONLY; |
1935 | 1941 | ||
1936 | flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | | 1942 | flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | |
1937 | MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT); | 1943 | MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT | |
1944 | MS_STRICTATIME); | ||
1938 | 1945 | ||
1939 | /* ... and get the mountpoint */ | 1946 | /* ... and get the mountpoint */ |
1940 | retval = kern_path(dir_name, LOOKUP_FOLLOW, &path); | 1947 | retval = kern_path(dir_name, LOOKUP_FOLLOW, &path); |