bio_copy_user_iov(): don't ignore ->iov_offset
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 24 Sep 2017 14:21:15 +0000 (10:21 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Oct 2017 07:38:31 +0000 (09:38 +0200)
commit9f3bb57753d26ef4c491cd17d0670c3dcbb5528c
treea79d7a67133227b409677ea8eae426b1c89d10f1
parent02fb540228593ed28ac19040d403996f907ff6a7
bio_copy_user_iov(): don't ignore ->iov_offset

commit 1cfd0ddd82232804e03f3023f6a58b50dfef0574 upstream.

Since "block: support large requests in blk_rq_map_user_iov" we
started to call it with partially drained iter; that works fine
on the write side, but reads create a copy of iter for completion
time.  And that needs to take the possibility of ->iov_iter != 0
into account...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/bio.c