Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118749
b: refs/heads/master
c: c435400
h: refs/heads/master
i:
  118747: 3f41a6c
v: v3
  • Loading branch information
Dmitri Monakhov authored and Mark Fasheh committed Nov 10, 2008
1 parent b0e0437 commit 42fc8ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 80bcaf3469b8aefd316d4ceb27d9af7cfbb0b913
refs/heads/master: c435400140d24fbcb3da6b1e006be831f9056cb6
7 changes: 7 additions & 0 deletions trunk/fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1866,6 +1866,13 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos,
ppos, count, ocount);
if (written < 0) {
/*
* direct write may have instantiated a few
* blocks outside i_size. Trim these off again.
* Don't need i_size_read because we hold i_mutex.
*/
if (*ppos + count > inode->i_size)
vmtruncate(inode, inode->i_size);
ret = written;
goto out_dio;
}
Expand Down

0 comments on commit 42fc8ef

Please sign in to comment.