fs/9p: don't set SB_NOATIME by default
authorYiwen Jiang <jiangyiwen@huawei.com>
Thu, 5 Apr 2018 23:19:57 +0000 (16:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Apr 2018 04:36:22 +0000 (21:36 -0700)
When the user uses some syscall, for example mmap(v9fs_file_mmap), it
will not update atime even if user's was set mnt_flags without
MNT_NOATIME, because v9fs defaults to settine SB_NOATIME in

For supporting access time updating when the user mounts with relatime,
we should not set SB_NOATIME by default.

Link: http://lkml.kernel.org/r/5AB9A377.6080906@huawei.com
Signed-off-by: Yiwen Jiang <jiangyiwen@huawei.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

index af03c2a901eb4fe0518d0fbbd60359f48357ab64..48ce50484e80e280990dc822bf3e833025cbbc10 100644 (file)
@@ -94,7 +94,7 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses,
        if (v9ses->cache)
                sb->s_bdi->ra_pages = (VM_MAX_READAHEAD * 1024)/PAGE_SIZE;
-       sb->s_flags |= SB_ACTIVE | SB_DIRSYNC | SB_NOATIME;
+       sb->s_flags |= SB_ACTIVE | SB_DIRSYNC;
        if (!v9ses->cache)
                sb->s_flags |= SB_SYNCHRONOUS;