瀏覽代碼

CIFS: 511c54a2f69195b28afb9dd119f03787b1625bb4 adds a check for session expiry, status STATUS_NETWORK_SESSION_EXPIRED, however the server can also respond with STATUS_USER_SESSION_DELETED in cases where the session has been idle for some time and the server reaps the session to recover resources.

Handle this additional status in the same way as SESSION_EXPIRED.

Signed-off-by: Mark Syms <mark.syms@citrix.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Mark Syms 7 年之前
父節點
當前提交
d81243c697
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      fs/cifs/smb2ops.c

+ 3 - 2
fs/cifs/smb2ops.c

@@ -1323,10 +1323,11 @@ smb2_is_session_expired(char *buf)
 {
 {
 	struct smb2_sync_hdr *shdr = get_sync_hdr(buf);
 	struct smb2_sync_hdr *shdr = get_sync_hdr(buf);
 
 
-	if (shdr->Status != STATUS_NETWORK_SESSION_EXPIRED)
+	if (shdr->Status != STATUS_NETWORK_SESSION_EXPIRED &&
+	    shdr->Status != STATUS_USER_SESSION_DELETED)
 		return false;
 		return false;
 
 
-	cifs_dbg(FYI, "Session expired\n");
+	cifs_dbg(FYI, "Session expired or deleted\n");
 	return true;
 	return true;
 }
 }