diff options
| author | 2016-05-17 02:17:59 -0400 | |
|---|---|---|
| committer | 2016-05-17 02:17:59 -0400 | |
| commit | 0e0162bb8c008fa7742f69d4d4982c8a37b88f95 (patch) | |
| tree | 4b230ab63b5698a44d2948e70a6cc22405c351e9 /drivers/block/loop.c | |
| parent | ext4: switch to ->iterate_shared() (diff) | |
| parent | ovl: ignore permissions on underlying lookup (diff) | |
Merge branch 'ovl-fixes' into for-linus
Backmerge to resolve a conflict in ovl_lookup_real();
"ovl_lookup_real(): use lookup_one_len_unlocked()" instead,
but it was too late in the cycle to rebase.
Diffstat (limited to 'drivers/block/loop.c')
| -rw-r--r-- | drivers/block/loop.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 423f4ca7d712..80cf8add46ff 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -488,6 +488,12 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd, bvec = __bvec_iter_bvec(bio->bi_io_vec, bio->bi_iter); iov_iter_bvec(&iter, ITER_BVEC | rw, bvec, bio_segments(bio), blk_rq_bytes(cmd->rq)); + /* + * This bio may be started from the middle of the 'bvec' + * because of bio splitting, so offset from the bvec must + * be passed to iov iterator + */ + iter.iov_offset = bio->bi_iter.bi_bvec_done; cmd->iocb.ki_pos = pos; cmd->iocb.ki_filp = file; |
