Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1836
b: refs/heads/master
c: a511718
h: refs/heads/master
v: v3
  • Loading branch information
Martin Schwidefsky authored and Linus Torvalds committed Jun 6, 2005
1 parent f8d8e93 commit 1098449
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7cef5677ef3a8084f2588ce0a129dc95d65161f6
refs/heads/master: a51171816826b074828fa96cb6ef60fc3b13631a
8 changes: 7 additions & 1 deletion trunk/mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1968,6 +1968,7 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
do {
unsigned long index;
unsigned long offset;
unsigned long maxlen;
size_t copied;

offset = (pos & (PAGE_CACHE_SIZE -1)); /* Within page */
Expand All @@ -1982,7 +1983,10 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
* same page as we're writing to, without it being marked
* up-to-date.
*/
fault_in_pages_readable(buf, bytes);
maxlen = cur_iov->iov_len - iov_base;
if (maxlen > bytes)
maxlen = bytes;
fault_in_pages_readable(buf, maxlen);

page = __grab_cache_page(mapping,index,&cached_page,&lru_pvec);
if (!page) {
Expand Down Expand Up @@ -2024,6 +2028,8 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
filemap_set_next_iovec(&cur_iov,
&iov_base, status);
buf = cur_iov->iov_base + iov_base;
} else {
iov_base += status;
}
}
}
Expand Down

0 comments on commit 1098449

Please sign in to comment.