Re: [PATCH 2/2] cifs: force new session setup and tcon for dfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/31, Paulo Alcantara wrote:
Do not reuse existing sessions and tcons in DFS failover as it might
connect to different servers and shares.

Signed-off-by: Paulo Alcantara (SUSE) <pc@xxxxxx>
---
fs/cifs/connect.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 3ca06bd88b6e..3956672a11ae 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -536,8 +536,11 @@ int cifs_reconnect(struct TCP_Server_Info *server, bool mark_smb_session)
		return __cifs_reconnect(server, mark_smb_session);
	}
	spin_unlock(&cifs_tcp_ses_lock);
-
-	return reconnect_dfs_server(server, mark_smb_session);
+	/*
+	 * Ignore @mark_smb_session and invalidate all sessions & tcons as we might be connecting to
+	 * a different server or share during failover.
+	 */
+	return reconnect_dfs_server(server, true);

If you're ignoring @mark_smb_session, why not just leave @server for
reconnect_dfs_server()?


Cheers,

Enzo



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux