summaryrefslogtreecommitdiffstats
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
authorAurelien Aptel <aaptel@suse.com>2018-11-16 16:13:25 +0100
committerSteve French <stfrench@microsoft.com>2018-12-23 23:05:11 -0600
commit5fc7fcd054adcf0f264446cbf778d33e30a45455 (patch)
tree31d5dd3cf962192e88a4113fb82c64d26c6d07ec /fs/cifs/misc.c
parentd9345e0ae7cff25e9aed39d21f092dbb482dffec (diff)
downloadlinux-5fc7fcd054adcf0f264446cbf778d33e30a45455.tar.bz2
cifs: auto disable 'serverino' in dfs mounts
Different servers have different set of file ids. After failover, unique IDs will be different so we can't validate them. Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: Paulo Alcantara <palcantara@suse.de> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r--fs/cifs/misc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 8a41f4eba726..f7c0c6fde552 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -525,9 +525,17 @@ void
cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb)
{
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {
+ struct cifs_tcon *tcon = NULL;
+
+ if (cifs_sb->master_tlink)
+ tcon = cifs_sb_master_tcon(cifs_sb);
+
cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM;
- cifs_dbg(VFS, "Autodisabling the use of server inode numbers on %s. This server doesn't seem to support them properly. Hardlinks will not be recognized on this mount. Consider mounting with the \"noserverino\" option to silence this message.\n",
- cifs_sb_master_tcon(cifs_sb)->treeName);
+ cifs_dbg(VFS, "Autodisabling the use of server inode numbers on %s.\n",
+ tcon ? tcon->treeName : "new server");
+ cifs_dbg(VFS, "The server doesn't seem to support them properly or the files might be on different servers (DFS).\n");
+ cifs_dbg(VFS, "Hardlinks will not be recognized on this mount. Consider mounting with the \"noserverino\" option to silence this message.\n");
+
}
}