Re: [PATCH v2 4/6] ksmbd: defer CHANGE_NOTIFY completion instead of STATUS_NOT_IMPLEMENTED

ChenXiaoSong <[email protected]>
Newsgroups org.kernel.vger.linux-cifs
Message-ID <[email protected]>
Hi Gaël and Namjae,

Do you think it would be better to send STATUS_CANCELLED in smb2_notify()?

On 7/9/26 08:06, Gaël Blivet-Bailly wrote:
> +static void smb2_notify_cancel_deferred(struct work_struct *w)
> +{
> +	struct notify_cancel_ctx *ctx =
> +		container_of(w, struct notify_cancel_ctx, work);
> +	struct ksmbd_work *in_work = ctx->in_work;
> +	struct smb2_hdr *in_hdr;
> +
> +	in_hdr = smb_get_msg(in_work->response_buf);
> +	in_hdr->Status = STATUS_CANCELLED;
> +	ksmbd_conn_write(in_work);
> +	ksmbd_free_work_struct(in_work);
> +	kfree(ctx);
> +}
> +
> +static void smb2_notify_cancel_fn(void **argv)
> +{
> +	...
> +	INIT_WORK(&ctx->work, smb2_notify_cancel_deferred);
> +	schedule_work(&ctx->work);
> +}

-- 
ChenXiaoSong <[email protected]>
Chinese Homepage: https://chenxiaosong.com
English Homepage: https://chenxiaosong.com/en
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.