diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-09-07 18:28:10 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-09-07 18:38:04 -0400 |
commit | 0aea92bf67321fc600b6c61627e0fd46e8889a49 (patch) | |
tree | 315431149092e75d2fa1313b315cc1834dbf56cb /fs/nfs | |
parent | 47040da3c7524facd542f37ffeadedac4f228601 (diff) |
NFS: nfs_compare_super shouldn't check the auth flavour unless 'sec=' was set
Also don't worry about obsolete mount flags...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/super.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index b2dd6da010b0..50bc31d8e7f0 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -2295,6 +2295,18 @@ void nfs_clone_super(struct super_block *sb, struct nfs_mount_info *mount_info) | |||
2295 | nfs_initialise_sb(sb); | 2295 | nfs_initialise_sb(sb); |
2296 | } | 2296 | } |
2297 | 2297 | ||
2298 | #define NFS_MOUNT_CMP_FLAGMASK ~(NFS_MOUNT_INTR \ | ||
2299 | | NFS_MOUNT_SECURE \ | ||
2300 | | NFS_MOUNT_TCP \ | ||
2301 | | NFS_MOUNT_VER3 \ | ||
2302 | | NFS_MOUNT_KERBEROS \ | ||
2303 | | NFS_MOUNT_NONLM \ | ||
2304 | | NFS_MOUNT_BROKEN_SUID \ | ||
2305 | | NFS_MOUNT_STRICTLOCK \ | ||
2306 | | NFS_MOUNT_UNSHARED \ | ||
2307 | | NFS_MOUNT_NORESVPORT \ | ||
2308 | | NFS_MOUNT_LEGACY_INTERFACE) | ||
2309 | |||
2298 | static int nfs_compare_mount_options(const struct super_block *s, const struct nfs_server *b, int flags) | 2310 | static int nfs_compare_mount_options(const struct super_block *s, const struct nfs_server *b, int flags) |
2299 | { | 2311 | { |
2300 | const struct nfs_server *a = s->s_fs_info; | 2312 | const struct nfs_server *a = s->s_fs_info; |
@@ -2305,7 +2317,7 @@ static int nfs_compare_mount_options(const struct super_block *s, const struct n | |||
2305 | goto Ebusy; | 2317 | goto Ebusy; |
2306 | if (a->nfs_client != b->nfs_client) | 2318 | if (a->nfs_client != b->nfs_client) |
2307 | goto Ebusy; | 2319 | goto Ebusy; |
2308 | if (a->flags != b->flags) | 2320 | if ((a->flags ^ b->flags) & NFS_MOUNT_CMP_FLAGMASK) |
2309 | goto Ebusy; | 2321 | goto Ebusy; |
2310 | if (a->wsize != b->wsize) | 2322 | if (a->wsize != b->wsize) |
2311 | goto Ebusy; | 2323 | goto Ebusy; |
@@ -2319,7 +2331,8 @@ static int nfs_compare_mount_options(const struct super_block *s, const struct n | |||
2319 | goto Ebusy; | 2331 | goto Ebusy; |
2320 | if (a->acdirmax != b->acdirmax) | 2332 | if (a->acdirmax != b->acdirmax) |
2321 | goto Ebusy; | 2333 | goto Ebusy; |
2322 | if (clnt_a->cl_auth->au_flavor != clnt_b->cl_auth->au_flavor) | 2334 | if (b->flags & NFS_MOUNT_SECFLAVOUR && |
2335 | clnt_a->cl_auth->au_flavor != clnt_b->cl_auth->au_flavor) | ||
2323 | goto Ebusy; | 2336 | goto Ebusy; |
2324 | return 1; | 2337 | return 1; |
2325 | Ebusy: | 2338 | Ebusy: |