aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorScott Mayhew <smayhew@redhat.com>2014-05-29 16:41:22 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-05-29 16:46:09 -0400
commitc8e470280a5c875468dd4eb41d8c4b44c87ebbcf (patch)
treec014ac25df6b70d334482305bc1b1862f9c852e4 /fs/nfs
parent8935ef664ea33a7ddd39015b26fe35aa7744f715 (diff)
nfs: Apply NFS_MOUNT_CMP_FLAGMASK to nfs_compare_remount_data()
Those flags are obsolete and checking them can incorrectly cause remount operations to fail. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/super.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 2cb56943e232..1a6d7ac9d9d2 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2180,11 +2180,23 @@ out_no_address:
2180 return -EINVAL; 2180 return -EINVAL;
2181} 2181}
2182 2182
2183#define NFS_MOUNT_CMP_FLAGMASK ~(NFS_MOUNT_INTR \
2184 | NFS_MOUNT_SECURE \
2185 | NFS_MOUNT_TCP \
2186 | NFS_MOUNT_VER3 \
2187 | NFS_MOUNT_KERBEROS \
2188 | NFS_MOUNT_NONLM \
2189 | NFS_MOUNT_BROKEN_SUID \
2190 | NFS_MOUNT_STRICTLOCK \
2191 | NFS_MOUNT_UNSHARED \
2192 | NFS_MOUNT_NORESVPORT \
2193 | NFS_MOUNT_LEGACY_INTERFACE)
2194
2183static int 2195static int
2184nfs_compare_remount_data(struct nfs_server *nfss, 2196nfs_compare_remount_data(struct nfs_server *nfss,
2185 struct nfs_parsed_mount_data *data) 2197 struct nfs_parsed_mount_data *data)
2186{ 2198{
2187 if (data->flags != nfss->flags || 2199 if ((data->flags ^ nfss->flags) & NFS_MOUNT_CMP_FLAGMASK ||
2188 data->rsize != nfss->rsize || 2200 data->rsize != nfss->rsize ||
2189 data->wsize != nfss->wsize || 2201 data->wsize != nfss->wsize ||
2190 data->version != nfss->nfs_client->rpc_ops->version || 2202 data->version != nfss->nfs_client->rpc_ops->version ||
@@ -2347,18 +2359,6 @@ void nfs_clone_super(struct super_block *sb, struct nfs_mount_info *mount_info)
2347 nfs_initialise_sb(sb); 2359 nfs_initialise_sb(sb);
2348} 2360}
2349 2361
2350#define NFS_MOUNT_CMP_FLAGMASK ~(NFS_MOUNT_INTR \
2351 | NFS_MOUNT_SECURE \
2352 | NFS_MOUNT_TCP \
2353 | NFS_MOUNT_VER3 \
2354 | NFS_MOUNT_KERBEROS \
2355 | NFS_MOUNT_NONLM \
2356 | NFS_MOUNT_BROKEN_SUID \
2357 | NFS_MOUNT_STRICTLOCK \
2358 | NFS_MOUNT_UNSHARED \
2359 | NFS_MOUNT_NORESVPORT \
2360 | NFS_MOUNT_LEGACY_INTERFACE)
2361
2362static int nfs_compare_mount_options(const struct super_block *s, const struct nfs_server *b, int flags) 2362static int nfs_compare_mount_options(const struct super_block *s, const struct nfs_server *b, int flags)
2363{ 2363{
2364 const struct nfs_server *a = s->s_fs_info; 2364 const struct nfs_server *a = s->s_fs_info;