diff --git a/mm/filemap.c b/mm/filemap.c index b573607b7112228142e77323f5f461593f7c36bb..c11418dd94e810f4c8d9c4aa7ed2fae6d8aba290 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1954,7 +1954,9 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov, if (unlikely(nr_segs > 1)) { filemap_set_next_iovec(&cur_iov, &iov_base, status); - buf = cur_iov->iov_base + iov_base; + if (count) + buf = cur_iov->iov_base + + iov_base; } else { iov_base += status; }