timerfd: convert to ->read_iter()
authorJens Axboe <axboe@kernel.dk>
Mon, 1 Apr 2024 17:48:37 +0000 (11:48 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Apr 2024 22:23:02 +0000 (16:23 -0600)
commitd94979904105a7ad8dca6fdcd8cb3fbecada22f1
treea309593fd67d235cab96063c8ab74eaec31da7f4
parent1f65f52d131ad92fda8a025f7d670e7a1a42a187
timerfd: convert to ->read_iter()

Switch timerfd to using fops->read_iter(), so it can support not just
O_NONBLOCK but IOCB_NOWAIT as well. With the latter, users like io_uring
interact with timerfds a lot better, as they can be driven purely
by the poll trigger.

Manually get and install the required fd, so that FMODE_NOWAIT can be
set before the file is installed into the file table.

No functional changes intended in this patch, it's purely a straight
conversion to using the read iterator method.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/timerfd.c