io_uring/rw: ensure kiocb_end_write() is always called
authorJens Axboe <axboe@kernel.dk>
Sun, 22 Jan 2023 17:36:37 +0000 (10:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:22:49 +0000 (07:22 +0100)
commitb10acfcd61b25ad5b97c155aad9c45d5ecbb9f39
treef104fa998f444e7395b365ddf3e1cdc6560f596a
parent124fb13cc75777d3903a1ea6094498c3ad477ef3
io_uring/rw: ensure kiocb_end_write() is always called

commit 2ec33a6c3cca9fe2465e82050c81f5ffdc508b36 upstream.

A previous commit moved the notifications and end-write handling, but
it is now missing a few spots where we also want to call both of those.
Without that, we can potentially be missing file notifications, and
more importantly, have an imbalance in the super_block writers sem
accounting.

Fixes: b000145e9907 ("io_uring/rw: defer fsnotify calls to task context")
Reported-by: Dave Chinner <david@fromorbit.com>
Link: https://lore.kernel.org/all/20221010050319.GC2703033@dread.disaster.area/
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/io_uring.c