diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-25 18:03:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-25 18:03:12 -0400 |
commit | 35efb51eee2241a970dcf70ed950f9db7e5351f7 (patch) | |
tree | 2b869d1db9a0d1672d2b1720d74a38a71e596459 /fs/ext4/inode.c | |
parent | b2ad81363f12261f8b6a97ed7723960ea6450f31 (diff) | |
parent | 66883da1eee8ad4b38eeff7fa1c86a097d9670fc (diff) |
Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 fixes from Ted Ts'o:
"Bug fixes (including a regression fix) for ext4"
* tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: fix dcache lookup of !casefolded directories
ext4: do not delete unlinked inode from orphan list on failed truncate
ext4: wait for outstanding dio during truncate in nojournal mode
ext4: don't perform block validity checks on the journal inode
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 82298c63ea6d..c7f77c643008 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -5625,25 +5625,22 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr) | |||
5625 | up_write(&EXT4_I(inode)->i_data_sem); | 5625 | up_write(&EXT4_I(inode)->i_data_sem); |
5626 | ext4_journal_stop(handle); | 5626 | ext4_journal_stop(handle); |
5627 | if (error) { | 5627 | if (error) { |
5628 | if (orphan) | 5628 | if (orphan && inode->i_nlink) |
5629 | ext4_orphan_del(NULL, inode); | 5629 | ext4_orphan_del(NULL, inode); |
5630 | goto err_out; | 5630 | goto err_out; |
5631 | } | 5631 | } |
5632 | } | 5632 | } |
5633 | if (!shrink) | 5633 | if (!shrink) { |
5634 | pagecache_isize_extended(inode, oldsize, inode->i_size); | 5634 | pagecache_isize_extended(inode, oldsize, inode->i_size); |
5635 | 5635 | } else { | |
5636 | /* | 5636 | /* |
5637 | * Blocks are going to be removed from the inode. Wait | 5637 | * Blocks are going to be removed from the inode. Wait |
5638 | * for dio in flight. Temporarily disable | 5638 | * for dio in flight. |
5639 | * dioread_nolock to prevent livelock. | 5639 | */ |
5640 | */ | 5640 | inode_dio_wait(inode); |
5641 | if (orphan) { | ||
5642 | if (!ext4_should_journal_data(inode)) { | ||
5643 | inode_dio_wait(inode); | ||
5644 | } else | ||
5645 | ext4_wait_for_tail_page_commit(inode); | ||
5646 | } | 5641 | } |
5642 | if (orphan && ext4_should_journal_data(inode)) | ||
5643 | ext4_wait_for_tail_page_commit(inode); | ||
5647 | down_write(&EXT4_I(inode)->i_mmap_sem); | 5644 | down_write(&EXT4_I(inode)->i_mmap_sem); |
5648 | 5645 | ||
5649 | rc = ext4_break_layouts(inode); | 5646 | rc = ext4_break_layouts(inode); |