ksmbd: mark SMB2_SESSION_EXPIRED to session when destroying previous session
authorNamjae Jeon <linkinjeon@kernel.org>
Sun, 10 Mar 2024 10:30:51 +0000 (19:30 +0900)
committerSteve French <stfrench@microsoft.com>
Tue, 12 Mar 2024 05:36:39 +0000 (00:36 -0500)
commitfa9415d4024fd0c58d24a4ad4f1826fb8bfcc4aa
treef2fcc8106162647ea1e397c2da830b54eaf0d278
parent34cd86b6632718b7df3999d96f51e63de41c5e4f
ksmbd: mark SMB2_SESSION_EXPIRED to session when destroying previous session

Currently ksmbd exit connection as well destroying previous session.
When testing durable handle feaure, I found that
destroy_previous_session() should destroy only session, i.e. the
connection should be still alive. This patch mark SMB2_SESSION_EXPIRED
on the previous session to be destroyed later and not used anymore.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/mgmt/user_session.c
fs/smb/server/mgmt/user_session.h
fs/smb/server/smb2pdu.c