diff options
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 33f81252a744..75572b5f2374 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -2193,12 +2193,12 @@ generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov, | |||
2193 | } | 2193 | } |
2194 | 2194 | ||
2195 | if (written > 0) { | 2195 | if (written > 0) { |
2196 | loff_t end = pos + written; | 2196 | pos += written; |
2197 | if (end > i_size_read(inode) && !S_ISBLK(inode->i_mode)) { | 2197 | if (pos > i_size_read(inode) && !S_ISBLK(inode->i_mode)) { |
2198 | i_size_write(inode, end); | 2198 | i_size_write(inode, pos); |
2199 | mark_inode_dirty(inode); | 2199 | mark_inode_dirty(inode); |
2200 | } | 2200 | } |
2201 | *ppos = end; | 2201 | *ppos = pos; |
2202 | } | 2202 | } |
2203 | out: | 2203 | out: |
2204 | return written; | 2204 | return written; |