diff options
Diffstat (limited to '')
-rw-r--r-- | fs/io_uring.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 36b001365a79..3d2d47540e1b 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -7919,14 +7919,6 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events, break; } while (1); - if (uts) { - struct timespec64 ts; - - if (get_timespec64(&ts, uts)) - return -EFAULT; - timeout = ktime_add_ns(timespec64_to_ktime(ts), ktime_get_ns()); - } - if (sig) { #ifdef CONFIG_COMPAT if (in_compat_syscall()) @@ -7940,6 +7932,14 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events, return ret; } + if (uts) { + struct timespec64 ts; + + if (get_timespec64(&ts, uts)) + return -EFAULT; + timeout = ktime_add_ns(timespec64_to_ktime(ts), ktime_get_ns()); + } + init_waitqueue_func_entry(&iowq.wq, io_wake_function); iowq.wq.private = current; INIT_LIST_HEAD(&iowq.wq.entry); |