diff options
author | Paulo Alcantara (SUSE) <paulo@paulo.ac> | 2019-06-18 22:16:02 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-07-08 06:37:43 +0300 |
commit | 29fbeb7a908a60a5ae8c50fbe171cb8fdcef1980 (patch) | |
tree | a99751e8ae257b0418efecb3ef3d79cdb9fe6d9e /fs/cifs/connect.c | |
parent | dc179268cde43e0fb17e03507f09a3485625e52f (diff) | |
download | linux-29fbeb7a908a60a5ae8c50fbe171cb8fdcef1980.tar.xz |
cifs: Properly handle auto disabling of serverino option
Fix mount options comparison when serverino option is turned off later
in cifs_autodisable_serverino() and thus avoiding mismatch of new cifs
mounts.
Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara (SUSE) <paulo@paulo.ac>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilove@microsoft.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 51f272377ae1..b8a60060d329 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -3467,12 +3467,16 @@ compare_mount_options(struct super_block *sb, struct cifs_mnt_data *mnt_data) { struct cifs_sb_info *old = CIFS_SB(sb); struct cifs_sb_info *new = mnt_data->cifs_sb; + unsigned int oldflags = old->mnt_cifs_flags & CIFS_MOUNT_MASK; + unsigned int newflags = new->mnt_cifs_flags & CIFS_MOUNT_MASK; if ((sb->s_flags & CIFS_MS_MASK) != (mnt_data->flags & CIFS_MS_MASK)) return 0; - if ((old->mnt_cifs_flags & CIFS_MOUNT_MASK) != - (new->mnt_cifs_flags & CIFS_MOUNT_MASK)) + if (old->mnt_cifs_serverino_autodisabled) + newflags &= ~CIFS_MOUNT_SERVER_INUM; + + if (oldflags != newflags) return 0; /* |