Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331619
b: refs/heads/master
c: 1b65007
h: refs/heads/master
i:
  331617: d817556
  331615: 96a7865
v: v3
  • Loading branch information
Dmitry Monakhov authored and Theodore Ts'o committed Sep 29, 2012
1 parent 989c959 commit 1aea125
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: 1c9114f9c0f10f58dd7e568a7152025af47b27e5
refs/heads/master: 1b65007e9870e0021397b548e8cd6bbc584f9152
9 changes: 7 additions & 2 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -4333,9 +4333,14 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
if (attr->ia_valid & ATTR_SIZE) {
if (attr->ia_size != i_size_read(inode)) {
truncate_setsize(inode, attr->ia_size);
/* Inode size will be reduced, wait for dio in flight */
if (orphan)
/* Inode size will be reduced, wait for dio in flight.
* Temporarily disable dioread_nolock to prevent
* livelock. */
if (orphan) {
ext4_inode_block_unlocked_dio(inode);
inode_dio_wait(inode);
ext4_inode_resume_unlocked_dio(inode);
}
}
ext4_truncate(inode);
}
Expand Down

0 comments on commit 1aea125

Please sign in to comment.