Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109057
b: refs/heads/master
c: b4df203
h: refs/heads/master
i:
  109055: d9ee509
v: v3
  • Loading branch information
Theodore Ts'o committed Aug 14, 2008
1 parent 6043175 commit afacd22
Show file tree
Hide file tree
Showing 2 changed files with 4 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: bf068ee266f9dbaa6dacb8433a366bb399e7ae5b
refs/heads/master: b4df2030858bde986cb6ff2e4b45945f84649e32
5 changes: 3 additions & 2 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3494,6 +3494,9 @@ void ext4_truncate(struct inode *inode)
* modify the block allocation tree.
*/
down_write(&ei->i_data_sem);

ext4_discard_reservation(inode);

/*
* The orphan list entry will now protect us from any crash which
* occurs before the truncate completes, so it is now safe to propagate
Expand Down Expand Up @@ -3563,8 +3566,6 @@ void ext4_truncate(struct inode *inode)
;
}

ext4_discard_reservation(inode);

up_write(&ei->i_data_sem);
inode->i_mtime = inode->i_ctime = ext4_current_time(inode);
ext4_mark_inode_dirty(handle, inode);
Expand Down

0 comments on commit afacd22

Please sign in to comment.