On Thu, Sep 21, 2023 at 9:28 AM Max Kellermann <max.kellermann@xxxxxxxxx> wrote: > I had another look at this, and something's fishy with the code or > with your explanation (or I still don't get it). If there is a > watch_queue, pipe_write() fails early with EXDEV - writing to such a > pipe is simply forbidden, the code is not reachable in the presence of > a watch_queue, therefore locking just because there might be a > wait_queue does not appear to make sense? Meanwhile I have figured that the spinlock in pipe_write() is obsolete. It was added by David as preparation for the notification feature, but the notification was finally merged, it had the EXDEV, and I believe it was not initially planned to implement it that way? So I believe the spinlock is really not necessary (anymore) and I have posted a patch that removes it. (David, you would have received my submission, unfortunately I misspelled your email address....) Max