diff options
author | David S. Miller <davem@davemloft.net> | 2019-04-05 17:14:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-05 17:14:19 -0400 |
commit | f83f7151950dd9e0f6b4a1a405bf5e55c5294e4d (patch) | |
tree | f8d9d8ee821fcc9f0a8e1a8679bc622219c70e3b /fs/io_uring.c | |
parent | 8f4043f1253292495dbf9c8be0c1b07b4b9902b7 (diff) | |
parent | 7f46774c6480174eb869a3c15167eafac467a6af (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor comment merge conflict in mlx5.
Staging driver has a fixup due to the skb->xmit_more changes
in 'net-next', but was removed in 'net'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 6aaa30580a2b..bbdbd56cf2ac 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c | |||
@@ -1022,6 +1022,8 @@ static int io_write(struct io_kiocb *req, const struct sqe_submit *s, | |||
1022 | 1022 | ||
1023 | ret = rw_verify_area(WRITE, file, &kiocb->ki_pos, iov_count); | 1023 | ret = rw_verify_area(WRITE, file, &kiocb->ki_pos, iov_count); |
1024 | if (!ret) { | 1024 | if (!ret) { |
1025 | ssize_t ret2; | ||
1026 | |||
1025 | /* | 1027 | /* |
1026 | * Open-code file_start_write here to grab freeze protection, | 1028 | * Open-code file_start_write here to grab freeze protection, |
1027 | * which will be released by another thread in | 1029 | * which will be released by another thread in |
@@ -1036,7 +1038,19 @@ static int io_write(struct io_kiocb *req, const struct sqe_submit *s, | |||
1036 | SB_FREEZE_WRITE); | 1038 | SB_FREEZE_WRITE); |
1037 | } | 1039 | } |
1038 | kiocb->ki_flags |= IOCB_WRITE; | 1040 | kiocb->ki_flags |= IOCB_WRITE; |
1039 | io_rw_done(kiocb, call_write_iter(file, kiocb, &iter)); | 1041 | |
1042 | ret2 = call_write_iter(file, kiocb, &iter); | ||
1043 | if (!force_nonblock || ret2 != -EAGAIN) { | ||
1044 | io_rw_done(kiocb, ret2); | ||
1045 | } else { | ||
1046 | /* | ||
1047 | * If ->needs_lock is true, we're already in async | ||
1048 | * context. | ||
1049 | */ | ||
1050 | if (!s->needs_lock) | ||
1051 | io_async_list_note(WRITE, req, iov_count); | ||
1052 | ret = -EAGAIN; | ||
1053 | } | ||
1040 | } | 1054 | } |
1041 | out_free: | 1055 | out_free: |
1042 | kfree(iovec); | 1056 | kfree(iovec); |
@@ -1968,7 +1982,15 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events, | |||
1968 | return 0; | 1982 | return 0; |
1969 | 1983 | ||
1970 | if (sig) { | 1984 | if (sig) { |
1971 | ret = set_user_sigmask(sig, &ksigmask, &sigsaved, sigsz); | 1985 | #ifdef CONFIG_COMPAT |
1986 | if (in_compat_syscall()) | ||
1987 | ret = set_compat_user_sigmask((const compat_sigset_t __user *)sig, | ||
1988 | &ksigmask, &sigsaved, sigsz); | ||
1989 | else | ||
1990 | #endif | ||
1991 | ret = set_user_sigmask(sig, &ksigmask, | ||
1992 | &sigsaved, sigsz); | ||
1993 | |||
1972 | if (ret) | 1994 | if (ret) |
1973 | return ret; | 1995 | return ret; |
1974 | } | 1996 | } |