From: Mark Syms Date: Thu, 24 May 2018 08:47:31 +0000 (+0100) Subject: CIFS: 511c54a2f69195b28afb9dd119f03787b1625bb4 adds a check for session expiry X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2a8737336dbd3906ec33c391a7b0f57d2f760d55;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git CIFS: 511c54a2f69195b28afb9dd119f03787b1625bb4 adds a check for session expiry commit d81243c697ffc71f983736e7da2db31a8be0001f upstream. Handle this additional status in the same way as SESSION_EXPIRED. Signed-off-by: Mark Syms Signed-off-by: Steve French CC: Stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 9f1613c01189..36bc9a7eb8ea 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -1256,10 +1256,11 @@ smb2_is_session_expired(char *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; - cifs_dbg(FYI, "Session expired\n"); + cifs_dbg(FYI, "Session expired or deleted\n"); return true; }