Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282960
b: refs/heads/master
c: 2aff57b
h: refs/heads/master
v: v3
  • Loading branch information
Yongqiang Yang authored and Theodore Ts'o committed Dec 28, 2011
1 parent 8610f76 commit c3c3434
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 22cdfca5641817060dd724a9c30442f5c0675fcd
refs/heads/master: 2aff57b0c052344e8401a8b4a33c2a1ecb0f627c
11 changes: 11 additions & 0 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -4647,6 +4647,17 @@ int ext4_change_inode_journal_flag(struct inode *inode, int val)
return 0;
if (is_journal_aborted(journal))
return -EROFS;
/* We have to allocate physical blocks for delalloc blocks
* before flushing journal. otherwise delalloc blocks can not
* be allocated any more. even more truncate on delalloc blocks
* could trigger BUG by flushing delalloc blocks in journal.
* There is no delalloc block in non-journal data mode.
*/
if (val && test_opt(inode->i_sb, DELALLOC)) {
err = ext4_alloc_da_blocks(inode);
if (err < 0)
return err;
}

jbd2_journal_lock_updates(journal);
jbd2_journal_flush(journal);
Expand Down

0 comments on commit c3c3434

Please sign in to comment.