Message ID | 20170603131511.25032-24-hch@lst.de (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
diff --git a/fs/iomap.c b/fs/iomap.c index 1c25ae30500e..258fb4100b1d 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -909,6 +909,9 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, break; } pos += ret; + + if (iov_iter_rw(iter) == READ && pos >= dio->i_size) + break; } while ((count = iov_iter_count(iter)) > 0); blk_finish_plug(&plug);