summaryrefslogtreecommitdiffstats
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-10-04 12:56:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-10-04 12:56:51 -0400
commitc4bd70e8c95b2b045ac686b4c654bf9bfbfe9f3b (patch)
tree987294ca14304b2e8cf4cdd07b41fdb47613fa2f /fs/io_uring.c
parentcc3a7bfe62b947b423fcb2cfe89fcba92bf48fa3 (diff)
parenta9eb49c964884654dd6394cb6abe7ceb021c9c96 (diff)
Merge tag 'for-linus-2019-10-03' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: - Mandate timespec64 for the io_uring timeout ABI (Arnd) - Set of NVMe changes via Sagi: - controller removal race fix from Balbir - quirk additions from Gabriel and Jian-Hong - nvme-pci power state save fix from Mario - Add 64bit user commands (for 64bit registers) from Marta - nvme-rdma/nvme-tcp fixes from Max, Mark and Me - Minor cleanups and nits from James, Dan and John - Two s390 dasd fixes (Jan, Stefan) - Have loop change block size in DIO mode (Martijn) - paride pg header ifdef guard (Masahiro) - Two blk-mq queue scheduler tweaks, fixing an ordering issue on zoned devices and suboptimal performance on others (Ming) * tag 'for-linus-2019-10-03' of git://git.kernel.dk/linux-block: (22 commits) block: sed-opal: fix sparse warning: convert __be64 data block: sed-opal: fix sparse warning: obsolete array init. block: pg: add header include guard Revert "s390/dasd: Add discard support for ESE volumes" s390/dasd: Fix error handling during online processing io_uring: use __kernel_timespec in timeout ABI loop: change queue block size to match when using DIO blk-mq: apply normal plugging for HDD blk-mq: honor IO scheduler for multiqueue devices nvme-rdma: fix possible use-after-free in connect timeout nvme: Move ctrl sqsize to generic space nvme: Add ctrl attributes for queue_count and sqsize nvme: allow 64-bit results in passthru commands nvme: Add quirk for Kingston NVME SSD running FW E8FK11.T nvmet-tcp: remove superflous check on request sgl Added QUIRKs for ADATA XPG SX8200 Pro 512GB nvme-rdma: Fix max_hw_sectors calculation nvme: fix an error code in nvme_init_subsystem() nvme-pci: Save PCI state before putting drive into deepest state nvme-tcp: fix wrong stop condition in io_work ...
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index aa8ac557493c..8a0381f1a43b 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1892,15 +1892,15 @@ static int io_timeout(struct io_kiocb *req, const struct io_uring_sqe *sqe)
1892 unsigned count, req_dist, tail_index; 1892 unsigned count, req_dist, tail_index;
1893 struct io_ring_ctx *ctx = req->ctx; 1893 struct io_ring_ctx *ctx = req->ctx;
1894 struct list_head *entry; 1894 struct list_head *entry;
1895 struct timespec ts; 1895 struct timespec64 ts;
1896 1896
1897 if (unlikely(ctx->flags & IORING_SETUP_IOPOLL)) 1897 if (unlikely(ctx->flags & IORING_SETUP_IOPOLL))
1898 return -EINVAL; 1898 return -EINVAL;
1899 if (sqe->flags || sqe->ioprio || sqe->buf_index || sqe->timeout_flags || 1899 if (sqe->flags || sqe->ioprio || sqe->buf_index || sqe->timeout_flags ||
1900 sqe->len != 1) 1900 sqe->len != 1)
1901 return -EINVAL; 1901 return -EINVAL;
1902 if (copy_from_user(&ts, (void __user *) (unsigned long) sqe->addr, 1902
1903 sizeof(ts))) 1903 if (get_timespec64(&ts, u64_to_user_ptr(sqe->addr)))
1904 return -EFAULT; 1904 return -EFAULT;
1905 1905
1906 /* 1906 /*
@@ -1934,7 +1934,7 @@ static int io_timeout(struct io_kiocb *req, const struct io_uring_sqe *sqe)
1934 1934
1935 hrtimer_init(&req->timeout.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 1935 hrtimer_init(&req->timeout.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
1936 req->timeout.timer.function = io_timeout_fn; 1936 req->timeout.timer.function = io_timeout_fn;
1937 hrtimer_start(&req->timeout.timer, timespec_to_ktime(ts), 1937 hrtimer_start(&req->timeout.timer, timespec64_to_ktime(ts),
1938 HRTIMER_MODE_REL); 1938 HRTIMER_MODE_REL);
1939 return 0; 1939 return 0;
1940} 1940}