All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] fs: use current->mm for io_uring
@ 2020-04-23 14:52 Minchan Kim
  2020-04-23 14:52 ` [PATCH 2/2] mm: support vector address ranges for process_madvise Minchan Kim
  0 siblings, 1 reply; 4+ messages in thread
From: Minchan Kim @ 2020-04-23 14:52 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, Minchan Kim, Jens Axboe, Jann Horn

per-request by Jens,
https://lore.kernel.org/io-uring/46e5b8bf-0f14-caff-f706-91794191e730@kernel.dk/

Andrew, please fold this into "mm/madvise: pass task and mm to do_madvise"

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jann Horn <jannh@google.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
---
 fs/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 54b7c4818289..94af6cd05fb5 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -3267,7 +3267,7 @@ static int io_madvise(struct io_kiocb *req, bool force_nonblock)
 	if (force_nonblock)
 		return -EAGAIN;
 
-	ret = do_madvise(NULL, req->work.mm, ma->addr, ma->len, ma->advice);
+	ret = do_madvise(NULL, current->mm, ma->addr, ma->len, ma->advice);
 	if (ret < 0)
 		req_set_fail_links(req);
 	io_cqring_add_event(req, ret);
-- 
2.26.1.301.g55bc3eb7cb9-goog



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-23 19:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23 14:52 [PATCH 1/2] fs: use current->mm for io_uring Minchan Kim
2020-04-23 14:52 ` [PATCH 2/2] mm: support vector address ranges for process_madvise Minchan Kim
2020-04-23 15:14   ` Matthew Wilcox
2020-04-23 19:58     ` Minchan Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.