OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0acdee
)
io_uring: enable shmem/memfd memory registration
author
Pavel Begunkov
<asml.silence@gmail.com>
Wed, 9 Jun 2021 14:26:54 +0000
(15:26 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 14 Jun 2021 14:23:05 +0000
(08:23 -0600)
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>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index
c42a2f3
..
b93fa32
100644
(file)
--- 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;