]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ksmbd: send pending interim for last compound I/O
authorNamjae Jeon <linkinjeon@kernel.org>
Sun, 21 Jun 2026 10:43:35 +0000 (19:43 +0900)
committerSteve French <stfrench@microsoft.com>
Tue, 23 Jun 2026 01:15:05 +0000 (20:15 -0500)
commitaffcd98fddc57d81648d8ede8546d31e4a3f8450
tree77d0f78cd1a3b6c959c4915061b50f3f60914a41
parentc5db4de8988f1a621556ca5c4537f77b766ca07d
ksmbd: send pending interim for last compound I/O

smb2.compound_async.write_write and smb2.compound_async.read_read expect
the last I/O request in a compound request to become cancellable before
its final response is received. smb clients mark a request cancellable
after receiving an interim STATUS_PENDING response.

ksmbd handled the last READ/WRITE synchronously and returned the final
response directly, so the client never observed STATUS_PENDING and
req->cancel.can_cancel remained false.

For the last READ or WRITE in a compound request, register the work briefly
as async and send a STATUS_PENDING interim response before continuing with
the normal synchronous completion. The final READ/WRITE response remains
unchanged.

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