summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-06-15 19:51:11 -0600
committerJens Axboe <axboe@kernel.dk>2022-06-16 07:14:44 -0600
commita76c0b31eef50fdb8b21d53a6d050f59241fb88e (patch)
treedfa5c6e86f7a6054822d6ffb84c118d8211a5ef6 /fs/cifs
parentc5595975b53a487bf329eeba65b5c5f34605a4c0 (diff)
io_uring: commit non-pollable provided mapped buffers upfront
For recv/recvmsg, IO either completes immediately or gets queued for a retry. This isn't the case for read/readv, if eg a normal file or a block device is used. Here, an operation can get queued with the block layer. If this happens, ring mapped buffers must get committed immediately to avoid that the next read can consume the same buffer. Check if we're dealing with pollable file, when getting a new ring mapped provided buffer. If it's not, commit it immediately rather than wait post issue. If we don't wait, we can race with completions coming in, or just plain buffer reuse by committing after a retry where others could have grabbed the same buffer. Fixes: c7fb19428d67 ("io_uring: add support for ring mapped supplied buffers") Reviewed-by: Hao Xu <howeyxu@tencent.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/cifs')
0 files changed, 0 insertions, 0 deletions