We were setting the size to the start of the write, not the end!!
Signed-off-by: NeilBrown <neilb@suse.de>
* No need to use i_size_read() here, the i_size
* cannot change under us because we hold i_sem.
*/
- if (pos > ino->i_size) {
- i_size_write(ino, pos);
+ if (pos + len > ino->i_size) {
+ i_size_write(ino, pos + len);
/* note that we deliberately don't call
* mark_inode_dirty(ino);
* The inode will automatically be written