diff options
author | Keith Busch <kbusch@kernel.org> | 2023-01-05 11:07:33 -0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-01-08 20:59:17 -0700 |
commit | 4397a17c1dc53f436285f372432dd1aea44e7953 (patch) | |
tree | 7da702820c2b600b1fe02662dd956d95d53034c1 /lib | |
parent | 1e23db450cff5f0410480137041181d1514bda2a (diff) |
iov_iter: move iter_ubuf check inside restore WARN
io_uring is using iter_ubuf types for single vector requests. We expect
state restore may happen for this type now, and it is already handled
correctly, so suppress the warning.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/iov_iter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c index f036760b66e2..d9b3332c8405 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -1902,8 +1902,8 @@ int import_ubuf(int rw, void __user *buf, size_t len, struct iov_iter *i) */ void iov_iter_restore(struct iov_iter *i, struct iov_iter_state *state) { - if (WARN_ON_ONCE(!iov_iter_is_bvec(i) && !iter_is_iovec(i)) && - !iov_iter_is_kvec(i) && !iter_is_ubuf(i)) + if (WARN_ON_ONCE(!iov_iter_is_bvec(i) && !iter_is_iovec(i) && + !iter_is_ubuf(i)) && !iov_iter_is_kvec(i)) return; i->iov_offset = state->iov_offset; i->count = state->count; |