Re: [RFC PATCH 10/11] smb/server: send notify events to the client

Namjae Jeon <[email protected]> Sat, 25 Jul 2026 22:58:07 +0900
Newsgroups org.kernel.vger.linux-cifs
Message-ID <CAKYAXd8qTX-+PFe5roH_AUqXxpHcWcz-ve97m=nky7SWDjgnHA@mail.gmail.com>
> @@ -752,6 +904,12 @@ int ksmbd_handle_notify(struct ksmbd_work *work,
>                 goto out;
>         }
>
> +       /* Changes which arrived without a waiter are returned synchronously. */
> +       if (ksmbd_notify_take_events(notify, &events)) {
This can violate the required FIFO completion order. If an older
CHANGE_NOTIFY request is already pending and events are waiting for
the delayed broadcast worker, a newly arriving request can take
notify->events here and complete before the older request. Please give
queued events to the oldest pending waiter first, and use this
synchronous path only when no earlier request is pending.
> +               err = ksmbd_notify_reply(work, notify, req, rsp, &events);
> +               goto out;
> +       }
> +