ksmbd: move oplock handling after unlock parent dir
authorNamjae Jeon <linkinjeon@kernel.org>
Sun, 31 Dec 2023 07:19:10 +0000 (16:19 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jan 2024 14:19:39 +0000 (15:19 +0100)
commite4ae1953755803378b7e0200bddf26e1f61927f4
tree0f0753624777778da8fd5daf19b4dd0852af34de
parentf263652dc6c95d973dcd97ec4bcc9b2c66471a3e
ksmbd: move oplock handling after unlock parent dir

[ Upstream commit 2e450920d58b4991a436c8cecf3484bcacd8e535 ]

ksmbd should process secound parallel smb2 create request during waiting
oplock break ack. parent lock range that is too large in smb2_open() causes
smb2_open() to be serialized. Move the oplock handling to the bottom of
smb2_open() and make it called after parent unlock. This fixes the failure
of smb2.lease.breaking1 testcase.

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