aboutsummaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 93595c327bbd..9b74674e36ad 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1949,7 +1949,7 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
1949 buf = iov->iov_base + written; 1949 buf = iov->iov_base + written;
1950 else { 1950 else {
1951 filemap_set_next_iovec(&cur_iov, &iov_base, written); 1951 filemap_set_next_iovec(&cur_iov, &iov_base, written);
1952 buf = iov->iov_base + iov_base; 1952 buf = cur_iov->iov_base + iov_base;
1953 } 1953 }
1954 1954
1955 do { 1955 do {
@@ -2007,9 +2007,11 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
2007 count -= status; 2007 count -= status;
2008 pos += status; 2008 pos += status;
2009 buf += status; 2009 buf += status;
2010 if (unlikely(nr_segs > 1)) 2010 if (unlikely(nr_segs > 1)) {
2011 filemap_set_next_iovec(&cur_iov, 2011 filemap_set_next_iovec(&cur_iov,
2012 &iov_base, status); 2012 &iov_base, status);
2013 buf = cur_iov->iov_base + iov_base;
2014 }
2013 } 2015 }
2014 } 2016 }
2015 if (unlikely(copied != bytes)) 2017 if (unlikely(copied != bytes))