namjaejeon / ksmbd

ksmbd kernel server(SMB/CIFS server)
https://github.com/cifsd-team/ksmbd
270 stars 62 forks source link

A ksmbd_work without SMB2_FLAGS_ASYNC_COMMAND needs call "cancel_fn" in "smb2_cancel"? #419

Closed MiaoLiHua closed 1 year ago

MiaoLiHua commented 1 year ago

In "smb2_cancel" function, at file "smb2pdu.c", lines 6798-6799 have called "cancel_fn" for hdr->Flags with SMB2_FLAGS_ASYNC_COMMAND, at line 6819 has not call the "cancel_fn". If hdr->Flags without SMB2_FLAGS_ASYNC_COMMAND, needs call "cancel_fn" also?

namjaejeon commented 1 year ago

Yes, It is not needed. Because ->cancel_fn is set in setup_async_work(). Can you tell me why you ask it ?

MiaoLiHua commented 1 year ago

@namjaejeon oh, sorry. Just I read some commits modified codes while git pull, observed that block call "cancel_fn" for all conditions. No other special ideas.