diff options
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index b961ceac66b4..5b19b6aabe18 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -2035,9 +2035,6 @@ static inline void nfs_initialise_sb(struct super_block *sb) | |||
2035 | sb->s_blocksize = nfs_block_bits(server->wsize, | 2035 | sb->s_blocksize = nfs_block_bits(server->wsize, |
2036 | &sb->s_blocksize_bits); | 2036 | &sb->s_blocksize_bits); |
2037 | 2037 | ||
2038 | if (server->flags & NFS_MOUNT_NOAC) | ||
2039 | sb->s_flags |= MS_SYNCHRONOUS; | ||
2040 | |||
2041 | sb->s_bdi = &server->backing_dev_info; | 2038 | sb->s_bdi = &server->backing_dev_info; |
2042 | 2039 | ||
2043 | nfs_super_set_maxbytes(sb, server->maxfilesize); | 2040 | nfs_super_set_maxbytes(sb, server->maxfilesize); |
@@ -2249,6 +2246,10 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type, | |||
2249 | if (server->flags & NFS_MOUNT_UNSHARED) | 2246 | if (server->flags & NFS_MOUNT_UNSHARED) |
2250 | compare_super = NULL; | 2247 | compare_super = NULL; |
2251 | 2248 | ||
2249 | /* -o noac implies -o sync */ | ||
2250 | if (server->flags & NFS_MOUNT_NOAC) | ||
2251 | sb_mntdata.mntflags |= MS_SYNCHRONOUS; | ||
2252 | |||
2252 | /* Get a superblock - note that we may end up sharing one that already exists */ | 2253 | /* Get a superblock - note that we may end up sharing one that already exists */ |
2253 | s = sget(fs_type, compare_super, nfs_set_super, &sb_mntdata); | 2254 | s = sget(fs_type, compare_super, nfs_set_super, &sb_mntdata); |
2254 | if (IS_ERR(s)) { | 2255 | if (IS_ERR(s)) { |
@@ -2361,6 +2362,10 @@ nfs_xdev_mount(struct file_system_type *fs_type, int flags, | |||
2361 | if (server->flags & NFS_MOUNT_UNSHARED) | 2362 | if (server->flags & NFS_MOUNT_UNSHARED) |
2362 | compare_super = NULL; | 2363 | compare_super = NULL; |
2363 | 2364 | ||
2365 | /* -o noac implies -o sync */ | ||
2366 | if (server->flags & NFS_MOUNT_NOAC) | ||
2367 | sb_mntdata.mntflags |= MS_SYNCHRONOUS; | ||
2368 | |||
2364 | /* Get a superblock - note that we may end up sharing one that already exists */ | 2369 | /* Get a superblock - note that we may end up sharing one that already exists */ |
2365 | s = sget(&nfs_fs_type, compare_super, nfs_set_super, &sb_mntdata); | 2370 | s = sget(&nfs_fs_type, compare_super, nfs_set_super, &sb_mntdata); |
2366 | if (IS_ERR(s)) { | 2371 | if (IS_ERR(s)) { |
@@ -2628,6 +2633,10 @@ nfs4_remote_mount(struct file_system_type *fs_type, int flags, | |||
2628 | if (server->flags & NFS4_MOUNT_UNSHARED) | 2633 | if (server->flags & NFS4_MOUNT_UNSHARED) |
2629 | compare_super = NULL; | 2634 | compare_super = NULL; |
2630 | 2635 | ||
2636 | /* -o noac implies -o sync */ | ||
2637 | if (server->flags & NFS_MOUNT_NOAC) | ||
2638 | sb_mntdata.mntflags |= MS_SYNCHRONOUS; | ||
2639 | |||
2631 | /* Get a superblock - note that we may end up sharing one that already exists */ | 2640 | /* Get a superblock - note that we may end up sharing one that already exists */ |
2632 | s = sget(&nfs4_fs_type, compare_super, nfs_set_super, &sb_mntdata); | 2641 | s = sget(&nfs4_fs_type, compare_super, nfs_set_super, &sb_mntdata); |
2633 | if (IS_ERR(s)) { | 2642 | if (IS_ERR(s)) { |
@@ -2789,7 +2798,7 @@ static struct dentry *nfs_follow_remote_path(struct vfsmount *root_mnt, | |||
2789 | goto out_put_mnt_ns; | 2798 | goto out_put_mnt_ns; |
2790 | 2799 | ||
2791 | ret = vfs_path_lookup(root_mnt->mnt_root, root_mnt, | 2800 | ret = vfs_path_lookup(root_mnt->mnt_root, root_mnt, |
2792 | export_path, LOOKUP_FOLLOW, &path); | 2801 | export_path, LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT, &path); |
2793 | 2802 | ||
2794 | nfs_referral_loop_unprotect(); | 2803 | nfs_referral_loop_unprotect(); |
2795 | put_mnt_ns(ns_private); | 2804 | put_mnt_ns(ns_private); |
@@ -2916,6 +2925,10 @@ nfs4_xdev_mount(struct file_system_type *fs_type, int flags, | |||
2916 | if (server->flags & NFS4_MOUNT_UNSHARED) | 2925 | if (server->flags & NFS4_MOUNT_UNSHARED) |
2917 | compare_super = NULL; | 2926 | compare_super = NULL; |
2918 | 2927 | ||
2928 | /* -o noac implies -o sync */ | ||
2929 | if (server->flags & NFS_MOUNT_NOAC) | ||
2930 | sb_mntdata.mntflags |= MS_SYNCHRONOUS; | ||
2931 | |||
2919 | /* Get a superblock - note that we may end up sharing one that already exists */ | 2932 | /* Get a superblock - note that we may end up sharing one that already exists */ |
2920 | s = sget(&nfs4_fs_type, compare_super, nfs_set_super, &sb_mntdata); | 2933 | s = sget(&nfs4_fs_type, compare_super, nfs_set_super, &sb_mntdata); |
2921 | if (IS_ERR(s)) { | 2934 | if (IS_ERR(s)) { |
@@ -3003,6 +3016,10 @@ nfs4_remote_referral_mount(struct file_system_type *fs_type, int flags, | |||
3003 | if (server->flags & NFS4_MOUNT_UNSHARED) | 3016 | if (server->flags & NFS4_MOUNT_UNSHARED) |
3004 | compare_super = NULL; | 3017 | compare_super = NULL; |
3005 | 3018 | ||
3019 | /* -o noac implies -o sync */ | ||
3020 | if (server->flags & NFS_MOUNT_NOAC) | ||
3021 | sb_mntdata.mntflags |= MS_SYNCHRONOUS; | ||
3022 | |||
3006 | /* Get a superblock - note that we may end up sharing one that already exists */ | 3023 | /* Get a superblock - note that we may end up sharing one that already exists */ |
3007 | s = sget(&nfs4_fs_type, compare_super, nfs_set_super, &sb_mntdata); | 3024 | s = sget(&nfs4_fs_type, compare_super, nfs_set_super, &sb_mntdata); |
3008 | if (IS_ERR(s)) { | 3025 | if (IS_ERR(s)) { |