aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/dir.c2
-rw-r--r--fs/ext4/extents.c12
-rw-r--r--fs/ext4/inode.c23
3 files changed, 19 insertions, 18 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index 884a6e776809..c7843b149a1e 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -671,7 +671,7 @@ static int ext4_d_compare(const struct dentry *dentry, unsigned int len,
671 if (!IS_CASEFOLDED(dentry->d_parent->d_inode)) { 671 if (!IS_CASEFOLDED(dentry->d_parent->d_inode)) {
672 if (len != name->len) 672 if (len != name->len)
673 return -1; 673 return -1;
674 return !memcmp(str, name, len); 674 return memcmp(str, name->name, len);
675 } 675 }
676 676
677 return ext4_ci_compare(dentry->d_parent->d_inode, name, &qstr); 677 return ext4_ci_compare(dentry->d_parent->d_inode, name, &qstr);
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index f2c62e2a0c98..d40ed940001e 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -518,10 +518,14 @@ __read_extent_tree_block(const char *function, unsigned int line,
518 } 518 }
519 if (buffer_verified(bh) && !(flags & EXT4_EX_FORCE_CACHE)) 519 if (buffer_verified(bh) && !(flags & EXT4_EX_FORCE_CACHE))
520 return bh; 520 return bh;
521 err = __ext4_ext_check(function, line, inode, 521 if (!ext4_has_feature_journal(inode->i_sb) ||
522 ext_block_hdr(bh), depth, pblk); 522 (inode->i_ino !=
523 if (err) 523 le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_journal_inum))) {
524 goto errout; 524 err = __ext4_ext_check(function, line, inode,
525 ext_block_hdr(bh), depth, pblk);
526 if (err)
527 goto errout;
528 }
525 set_buffer_verified(bh); 529 set_buffer_verified(bh);
526 /* 530 /*
527 * If this is a leaf block, cache all of its entries 531 * If this is a leaf block, cache all of its entries
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);