diff options
| author | Yang Xiuwei <yangxiuwei@kylinos.cn> | 2026-08-19 10:54:35 +0800 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-10-05 16:05:43 +0200 |
| commit | 51562a8cb11628d3a5e105b4c347ec5473e5745f (patch) | |
| tree | 38984354bcc41a3cbdb075f97bf41a8b28013e2a /include/linux/pps_kernel.h | |
| parent | b6e8add5d79d1f6f819a054c833bab452bd7365d (diff) | |
| download | linux-next-51562a8cb11628d3a5e105b4c347ec5473e5745f.tar.gz linux-next-51562a8cb11628d3a5e105b4c347ec5473e5745f.zip | |
btrfs: don't stash io_uring encoded data across -EAGAIN
Returning -EAGAIN while leaving btrfs_uring_encoded_data in the cmd PDU
leaks if the request is cancelled or the ring exits before reissue.
io_uring does not free driver PDU allocations on cleanup.
Write: io_queue_sqe() always issues with IO_URING_F_NONBLOCK first, so
return -EAGAIN before allocating and free data on every exit.
Read: free on nowait -EAGAIN too; only -EIOCBQUEUED keeps the allocation
for btrfs_uring_read_finished().
Fixes: 34310c442e17 ("btrfs: add io_uring command for encoded reads (ENCODED_READ ioctl)")
Fixes: e32dcdb0af9f ("btrfs: add io_uring interface for encoded writes")
Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/linux/pps_kernel.h')
0 files changed, 0 insertions, 0 deletions
