Skip to content

Commit c71ffb6

Browse files
committed
io_uring: remove 'ev_flags' argument
We always pass in 0 for the cqe flags argument, since the support for "this read hit page cache" hint was dropped. Signed-off-by: Jens Axboe <[email protected]>
1 parent 44a9bd1 commit c71ffb6

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

fs/io_uring.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ static struct io_uring_cqe *io_get_cqring(struct io_ring_ctx *ctx)
489489
}
490490

491491
static void io_cqring_fill_event(struct io_ring_ctx *ctx, u64 ki_user_data,
492-
long res, unsigned ev_flags)
492+
long res)
493493
{
494494
struct io_uring_cqe *cqe;
495495

@@ -502,7 +502,7 @@ static void io_cqring_fill_event(struct io_ring_ctx *ctx, u64 ki_user_data,
502502
if (cqe) {
503503
WRITE_ONCE(cqe->user_data, ki_user_data);
504504
WRITE_ONCE(cqe->res, res);
505-
WRITE_ONCE(cqe->flags, ev_flags);
505+
WRITE_ONCE(cqe->flags, 0);
506506
} else {
507507
unsigned overflow = READ_ONCE(ctx->cq_ring->overflow);
508508

@@ -521,12 +521,12 @@ static void io_cqring_ev_posted(struct io_ring_ctx *ctx)
521521
}
522522

523523
static void io_cqring_add_event(struct io_ring_ctx *ctx, u64 user_data,
524-
long res, unsigned ev_flags)
524+
long res)
525525
{
526526
unsigned long flags;
527527

528528
spin_lock_irqsave(&ctx->completion_lock, flags);
529-
io_cqring_fill_event(ctx, user_data, res, ev_flags);
529+
io_cqring_fill_event(ctx, user_data, res);
530530
io_commit_cqring(ctx);
531531
spin_unlock_irqrestore(&ctx->completion_lock, flags);
532532

@@ -628,7 +628,7 @@ static void io_iopoll_complete(struct io_ring_ctx *ctx, unsigned int *nr_events,
628628
req = list_first_entry(done, struct io_kiocb, list);
629629
list_del(&req->list);
630630

631-
io_cqring_fill_event(ctx, req->user_data, req->error, 0);
631+
io_cqring_fill_event(ctx, req->user_data, req->error);
632632
(*nr_events)++;
633633

634634
if (refcount_dec_and_test(&req->refs)) {
@@ -776,7 +776,7 @@ static void io_complete_rw(struct kiocb *kiocb, long res, long res2)
776776

777777
kiocb_end_write(kiocb);
778778

779-
io_cqring_add_event(req->ctx, req->user_data, res, 0);
779+
io_cqring_add_event(req->ctx, req->user_data, res);
780780
io_put_req(req);
781781
}
782782

@@ -1211,7 +1211,7 @@ static int io_nop(struct io_kiocb *req, u64 user_data)
12111211
if (unlikely(ctx->flags & IORING_SETUP_IOPOLL))
12121212
return -EINVAL;
12131213

1214-
io_cqring_add_event(ctx, user_data, err, 0);
1214+
io_cqring_add_event(ctx, user_data, err);
12151215
io_put_req(req);
12161216
return 0;
12171217
}
@@ -1256,7 +1256,7 @@ static int io_fsync(struct io_kiocb *req, const struct io_uring_sqe *sqe,
12561256
end > 0 ? end : LLONG_MAX,
12571257
fsync_flags & IORING_FSYNC_DATASYNC);
12581258

1259-
io_cqring_add_event(req->ctx, sqe->user_data, ret, 0);
1259+
io_cqring_add_event(req->ctx, sqe->user_data, ret);
12601260
io_put_req(req);
12611261
return 0;
12621262
}
@@ -1300,7 +1300,7 @@ static int io_sync_file_range(struct io_kiocb *req,
13001300

13011301
ret = sync_file_range(req->rw.ki_filp, sqe_off, sqe_len, flags);
13021302

1303-
io_cqring_add_event(req->ctx, sqe->user_data, ret, 0);
1303+
io_cqring_add_event(req->ctx, sqe->user_data, ret);
13041304
io_put_req(req);
13051305
return 0;
13061306
}
@@ -1358,7 +1358,7 @@ static int io_poll_remove(struct io_kiocb *req, const struct io_uring_sqe *sqe)
13581358
}
13591359
spin_unlock_irq(&ctx->completion_lock);
13601360

1361-
io_cqring_add_event(req->ctx, sqe->user_data, ret, 0);
1361+
io_cqring_add_event(req->ctx, sqe->user_data, ret);
13621362
io_put_req(req);
13631363
return 0;
13641364
}
@@ -1367,7 +1367,7 @@ static void io_poll_complete(struct io_ring_ctx *ctx, struct io_kiocb *req,
13671367
__poll_t mask)
13681368
{
13691369
req->poll.done = true;
1370-
io_cqring_fill_event(ctx, req->user_data, mangle_poll(mask), 0);
1370+
io_cqring_fill_event(ctx, req->user_data, mangle_poll(mask));
13711371
io_commit_cqring(ctx);
13721372
}
13731373

@@ -1687,7 +1687,7 @@ static void io_sq_wq_submit_work(struct work_struct *work)
16871687
io_put_req(req);
16881688

16891689
if (ret) {
1690-
io_cqring_add_event(ctx, sqe->user_data, ret, 0);
1690+
io_cqring_add_event(ctx, sqe->user_data, ret);
16911691
io_put_req(req);
16921692
}
16931693

@@ -1992,7 +1992,7 @@ static int io_submit_sqes(struct io_ring_ctx *ctx, struct sqe_submit *sqes,
19921992
continue;
19931993
}
19941994

1995-
io_cqring_add_event(ctx, sqes[i].sqe->user_data, ret, 0);
1995+
io_cqring_add_event(ctx, sqes[i].sqe->user_data, ret);
19961996
}
19971997

19981998
if (statep)
@@ -2157,7 +2157,7 @@ static int io_ring_submit(struct io_ring_ctx *ctx, unsigned int to_submit)
21572157

21582158
ret = io_submit_sqe(ctx, &s, statep);
21592159
if (ret)
2160-
io_cqring_add_event(ctx, s.sqe->user_data, ret, 0);
2160+
io_cqring_add_event(ctx, s.sqe->user_data, ret);
21612161
}
21622162
io_commit_sqring(ctx);
21632163

0 commit comments

Comments
 (0)