OSDN Git Service

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:35:41 +0000 (09:35 +0200)
commited35ded9c781b2cd86bec3b7b91fd65f310e4700
treec462a0051904c6cabb6490a0941057a166eabeef
parente67dfe75b6830279ef24bfa5237c1488e2890a8d
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