diff options
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index b961ceac66b4..480b3b6bf71e 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -733,18 +733,22 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt) | |||
733 | 733 | ||
734 | return 0; | 734 | return 0; |
735 | } | 735 | } |
736 | |||
737 | #ifdef CONFIG_NFS_V4 | ||
736 | #ifdef CONFIG_NFS_V4_1 | 738 | #ifdef CONFIG_NFS_V4_1 |
737 | void show_sessions(struct seq_file *m, struct nfs_server *server) | 739 | static void show_sessions(struct seq_file *m, struct nfs_server *server) |
738 | { | 740 | { |
739 | if (nfs4_has_session(server->nfs_client)) | 741 | if (nfs4_has_session(server->nfs_client)) |
740 | seq_printf(m, ",sessions"); | 742 | seq_printf(m, ",sessions"); |
741 | } | 743 | } |
742 | #else | 744 | #else |
743 | void show_sessions(struct seq_file *m, struct nfs_server *server) {} | 745 | static void show_sessions(struct seq_file *m, struct nfs_server *server) {} |
746 | #endif | ||
744 | #endif | 747 | #endif |
745 | 748 | ||
749 | #ifdef CONFIG_NFS_V4 | ||
746 | #ifdef CONFIG_NFS_V4_1 | 750 | #ifdef CONFIG_NFS_V4_1 |
747 | void show_pnfs(struct seq_file *m, struct nfs_server *server) | 751 | static void show_pnfs(struct seq_file *m, struct nfs_server *server) |
748 | { | 752 | { |
749 | seq_printf(m, ",pnfs="); | 753 | seq_printf(m, ",pnfs="); |
750 | if (server->pnfs_curr_ld) | 754 | if (server->pnfs_curr_ld) |
@@ -752,9 +756,10 @@ void show_pnfs(struct seq_file *m, struct nfs_server *server) | |||
752 | else | 756 | else |
753 | seq_printf(m, "not configured"); | 757 | seq_printf(m, "not configured"); |
754 | } | 758 | } |
755 | #else /* CONFIG_NFS_V4_1 */ | 759 | #else |
756 | void show_pnfs(struct seq_file *m, struct nfs_server *server) {} | 760 | static void show_pnfs(struct seq_file *m, struct nfs_server *server) {} |
757 | #endif /* CONFIG_NFS_V4_1 */ | 761 | #endif |
762 | #endif | ||
758 | 763 | ||
759 | static int nfs_show_devname(struct seq_file *m, struct vfsmount *mnt) | 764 | static int nfs_show_devname(struct seq_file *m, struct vfsmount *mnt) |
760 | { | 765 | { |
@@ -2035,9 +2040,6 @@ static inline void nfs_initialise_sb(struct super_block *sb) | |||
2035 | sb->s_blocksize = nfs_block_bits(server->wsize, | 2040 | sb->s_blocksize = nfs_block_bits(server->wsize, |
2036 | &sb->s_blocksize_bits); | 2041 | &sb->s_blocksize_bits); |
2037 | 2042 | ||
2038 | if (server->flags & NFS_MOUNT_NOAC) | ||
2039 | sb->s_flags |= MS_SYNCHRONOUS; | ||
2040 | |||
2041 | sb->s_bdi = &server->backing_dev_info; | 2043 | sb->s_bdi = &server->backing_dev_info; |
2042 | 2044 | ||
2043 | nfs_super_set_maxbytes(sb, server->maxfilesize); | 2045 | nfs_super_set_maxbytes(sb, server->maxfilesize); |
@@ -2249,6 +2251,10 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type, | |||
2249 | if (server->flags & NFS_MOUNT_UNSHARED) | 2251 | if (server->flags & NFS_MOUNT_UNSHARED) |
2250 | compare_super = NULL; | 2252 | compare_super = NULL; |
2251 | 2253 | ||
2254 | /* -o noac implies -o sync */ | ||
2255 | if (server->flags & NFS_MOUNT_NOAC) | ||
2256 | sb_mntdata.mntflags |= MS_SYNCHRONOUS; | ||
2257 | |||
2252 | /* Get a superblock - note that we may end up sharing one that already exists */ | 2258 | /* 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); | 2259 | s = sget(fs_type, compare_super, nfs_set_super, &sb_mntdata); |
2254 | if (IS_ERR(s)) { | 2260 | if (IS_ERR(s)) { |
@@ -2361,6 +2367,10 @@ nfs_xdev_mount(struct file_system_type *fs_type, int flags, | |||
2361 | if (server->flags & NFS_MOUNT_UNSHARED) | 2367 | if (server->flags & NFS_MOUNT_UNSHARED) |
2362 | compare_super = NULL; | 2368 | compare_super = NULL; |
2363 | 2369 | ||
2370 | /* -o noac implies -o sync */ | ||
2371 | if (server->flags & NFS_MOUNT_NOAC) | ||
2372 | sb_mntdata.mntflags |= MS_SYNCHRONOUS; | ||
2373 | |||
2364 | /* Get a superblock - note that we may end up sharing one that already exists */ | 2374 | /* 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); | 2375 | s = sget(&nfs_fs_type, compare_super, nfs_set_super, &sb_mntdata); |
2366 | if (IS_ERR(s)) { | 2376 | if (IS_ERR(s)) { |
@@ -2628,6 +2638,10 @@ nfs4_remote_mount(struct file_system_type *fs_type, int flags, | |||
2628 | if (server->flags & NFS4_MOUNT_UNSHARED) | 2638 | if (server->flags & NFS4_MOUNT_UNSHARED) |
2629 | compare_super = NULL; | 2639 | compare_super = NULL; |
2630 | 2640 | ||
2641 | /* -o noac implies -o sync */ | ||
2642 | if (server->flags & NFS_MOUNT_NOAC) | ||
2643 | sb_mntdata.mntflags |= MS_SYNCHRONOUS; | ||
2644 | |||
2631 | /* Get a superblock - note that we may end up sharing one that already exists */ | 2645 | /* 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); | 2646 | s = sget(&nfs4_fs_type, compare_super, nfs_set_super, &sb_mntdata); |
2633 | if (IS_ERR(s)) { | 2647 | if (IS_ERR(s)) { |
@@ -2789,7 +2803,7 @@ static struct dentry *nfs_follow_remote_path(struct vfsmount *root_mnt, | |||
2789 | goto out_put_mnt_ns; | 2803 | goto out_put_mnt_ns; |
2790 | 2804 | ||
2791 | ret = vfs_path_lookup(root_mnt->mnt_root, root_mnt, | 2805 | ret = vfs_path_lookup(root_mnt->mnt_root, root_mnt, |
2792 | export_path, LOOKUP_FOLLOW, &path); | 2806 | export_path, LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT, &path); |
2793 | 2807 | ||
2794 | nfs_referral_loop_unprotect(); | 2808 | nfs_referral_loop_unprotect(); |
2795 | put_mnt_ns(ns_private); | 2809 | put_mnt_ns(ns_private); |
@@ -2916,6 +2930,10 @@ nfs4_xdev_mount(struct file_system_type *fs_type, int flags, | |||
2916 | if (server->flags & NFS4_MOUNT_UNSHARED) | 2930 | if (server->flags & NFS4_MOUNT_UNSHARED) |
2917 | compare_super = NULL; | 2931 | compare_super = NULL; |
2918 | 2932 | ||
2933 | /* -o noac implies -o sync */ | ||
2934 | if (server->flags & NFS_MOUNT_NOAC) | ||
2935 | sb_mntdata.mntflags |= MS_SYNCHRONOUS; | ||
2936 | |||
2919 | /* Get a superblock - note that we may end up sharing one that already exists */ | 2937 | /* 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); | 2938 | s = sget(&nfs4_fs_type, compare_super, nfs_set_super, &sb_mntdata); |
2921 | if (IS_ERR(s)) { | 2939 | if (IS_ERR(s)) { |
@@ -3003,6 +3021,10 @@ nfs4_remote_referral_mount(struct file_system_type *fs_type, int flags, | |||
3003 | if (server->flags & NFS4_MOUNT_UNSHARED) | 3021 | if (server->flags & NFS4_MOUNT_UNSHARED) |
3004 | compare_super = NULL; | 3022 | compare_super = NULL; |
3005 | 3023 | ||
3024 | /* -o noac implies -o sync */ | ||
3025 | if (server->flags & NFS_MOUNT_NOAC) | ||
3026 | sb_mntdata.mntflags |= MS_SYNCHRONOUS; | ||
3027 | |||
3006 | /* Get a superblock - note that we may end up sharing one that already exists */ | 3028 | /* 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); | 3029 | s = sget(&nfs4_fs_type, compare_super, nfs_set_super, &sb_mntdata); |
3008 | if (IS_ERR(s)) { | 3030 | if (IS_ERR(s)) { |