projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5277dea
)
io_uring: use kmemdup instead of kmalloc and memcpy
author
Jackie Liu
<liuyun01@kylinos.cn>
Wed, 18 Sep 2019 02:37:52 +0000
(10:37 +0800)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 18 Sep 2019 17:19:06 +0000
(11:19 -0600)
Just clean up the code, no function changes.
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index 0dadbdbead0fbfef8b0f2373756b3254832ada53..42a684ef578ab710e93892aae1646c0f75c69492 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-2098,13
+2098,11
@@
static int __io_queue_sqe(struct io_ring_ctx *ctx, struct io_kiocb *req,
if (ret == -EAGAIN && !(req->flags & REQ_F_NOWAIT)) {
struct io_uring_sqe *sqe_copy;
- sqe_copy = km
alloc(
sizeof(*sqe_copy), GFP_KERNEL);
+ sqe_copy = km
emdup(s->sqe,
sizeof(*sqe_copy), GFP_KERNEL);
if (sqe_copy) {
struct async_list *list;
- memcpy(sqe_copy, s->sqe, sizeof(*sqe_copy));
s->sqe = sqe_copy;
-
memcpy(&req->submit, s, sizeof(*s));
list = io_async_list_from_sqe(ctx, s->sqe);
if (!io_add_to_prev_work(list, req)) {