diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-06-09 15:26:54 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-06-14 08:23:05 -0600 |
commit | 40dad765c045ab6dbd481cc4f00d04953e77510c (patch) | |
tree | 385e16833c80c385e4a00d6c5e02937b24b83e60 /fs/io_uring.c | |
parent | d0acdee296d42e700c16271d9f95085a9c897a53 (diff) | |
download | lwn-40dad765c045ab6dbd481cc4f00d04953e77510c.tar.gz lwn-40dad765c045ab6dbd481cc4f00d04953e77510c.zip |
io_uring: enable shmem/memfd memory registration
Relax buffer registration restictions, which filters out file backed
memory, and allow shmem/memfd as they have normal anonymous pages
underneath.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index c42a2f3b7259..b93fa32172af 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -8306,6 +8306,8 @@ static int io_sqe_buffer_register(struct io_ring_ctx *ctx, struct iovec *iov, for (i = 0; i < nr_pages; i++) { struct vm_area_struct *vma = vmas[i]; + if (vma_is_shmem(vma)) + continue; if (vma->vm_file && !is_file_hugepages(vma->vm_file)) { ret = -EOPNOTSUPP; |