Message ID | 20220518084005.3255380-2-hch@lst.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/6] io_uring: use a rwf_t for io_rw.flags | expand |
On Wed, 18 May 2022 10:40:00 +0200, Christoph Hellwig wrote: > Remove the bogus __force casts and just use the proper type instead. > > Applied, thanks! [1/6] io_uring: use a rwf_t for io_rw.flags commit: 20cbd21d899b72765e38481a926c7b2008c64350 [2/6] io_uring: don't use ERR_PTR for user pointers commit: 984824db844a9bd6e9e15ee469241982526a6ccd [3/6] io_uring: drop a spurious inline on a forward declaration commit: ee67ba3b20f7dcd001b7743eb8e46880cb27fdc6 [4/6] io_uring: make apoll_events a __poll_t commit: 58f5c8d39e0ea07fdaaea6a85c49000da83dc0cc [5/6] io_uring: consistently use the EPOLL* defines commit: a294bef57c55a45aef51d31e71d6892e8eba1483 [6/6] io_uring: use rcu_dereference in io_close commit: 0bf1dbee9baf3e78bff297245178f8c9a8ef8670 Best regards,
diff --git a/fs/io_uring.c b/fs/io_uring.c index 0b05d5aa5891a..99862cbc1041c 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -644,7 +644,7 @@ struct io_rw { struct kiocb kiocb; u64 addr; u32 len; - u32 flags; + rwf_t flags; }; struct io_connect { @@ -3636,7 +3636,7 @@ static int io_prep_rw(struct io_kiocb *req, const struct io_uring_sqe *sqe) req->imu = NULL; req->rw.addr = READ_ONCE(sqe->addr); req->rw.len = READ_ONCE(sqe->len); - req->rw.flags = (__force u32)READ_ONCE(sqe->rw_flags); + req->rw.flags = READ_ONCE(sqe->rw_flags); /* used for fixed read/write too - just read unconditionally */ req->buf_index = READ_ONCE(sqe->buf_index); return 0; @@ -4274,7 +4274,7 @@ static int io_rw_init_file(struct io_kiocb *req, fmode_t mode) req->flags |= io_file_get_flags(file) << REQ_F_SUPPORT_NOWAIT_BIT; kiocb->ki_flags = iocb_flags(file); - ret = kiocb_set_rw_flags(kiocb, (__force rwf_t)req->rw.flags); + ret = kiocb_set_rw_flags(kiocb, req->rw.flags); if (unlikely(ret)) return ret;
Remove the bogus __force casts and just use the proper type instead. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/io_uring.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)