diff options
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index dd9c93b5a9d5..7886176232c1 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -2473,6 +2473,14 @@ long do_mount(const char *dev_name, const char *dir_name, | |||
2473 | if (flags & MS_RDONLY) | 2473 | if (flags & MS_RDONLY) |
2474 | mnt_flags |= MNT_READONLY; | 2474 | mnt_flags |= MNT_READONLY; |
2475 | 2475 | ||
2476 | /* The default atime for remount is preservation */ | ||
2477 | if ((flags & MS_REMOUNT) && | ||
2478 | ((flags & (MS_NOATIME | MS_NODIRATIME | MS_RELATIME | | ||
2479 | MS_STRICTATIME)) == 0)) { | ||
2480 | mnt_flags &= ~MNT_ATIME_MASK; | ||
2481 | mnt_flags |= path.mnt->mnt_flags & MNT_ATIME_MASK; | ||
2482 | } | ||
2483 | |||
2476 | flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | MS_BORN | | 2484 | flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | MS_BORN | |
2477 | MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT | | 2485 | MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT | |
2478 | MS_STRICTATIME); | 2486 | MS_STRICTATIME); |