mirror of https://gitee.com/openkylin/linux.git
Bug fixes (including a regression fix) for ext4.
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEK2m5VNv+CHkogTfJ8vlZVpUNgaMFAlzppnIACgkQ8vlZVpUN gaOWcwf/YmIeCi7HHuOJG5STYhMZjbAoK7eCNSjmP0HBIpyZSBaSZg1/ZEmtTVA6 SyGWxYD2xymphkEcRQ20pF8h2CYurHsjYl9RH+Im2iaCzdeFKvgfYxSSsqsaZixM ejQK22W6mVULd1RqFGNPeo+5v7Fxn6fK0zw2k5JrLjFnIRq/XIA7qMdjblPOcfi+ QT/K9a2DZ5vHBGDKjEiVA+a0HX6bxdGTiiT4LW+uiHUJUESBWNQJqOHJqno9VdFh J97/3XJHMGPAbjD4AiINAL0x8IZ2FXx1H+QgVDnrxy8lVrYaMVvWMEokMQ7HvkFr SmYddgBPUHO+kk4u34nznZNuesvOqQ== =dFk1 -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
35efb51eee
|
@ -671,7 +671,7 @@ static int ext4_d_compare(const struct dentry *dentry, unsigned int len,
|
|||
if (!IS_CASEFOLDED(dentry->d_parent->d_inode)) {
|
||||
if (len != name->len)
|
||||
return -1;
|
||||
return !memcmp(str, name, len);
|
||||
return memcmp(str, name->name, len);
|
||||
}
|
||||
|
||||
return ext4_ci_compare(dentry->d_parent->d_inode, name, &qstr);
|
||||
|
|
|
@ -518,10 +518,14 @@ __read_extent_tree_block(const char *function, unsigned int line,
|
|||
}
|
||||
if (buffer_verified(bh) && !(flags & EXT4_EX_FORCE_CACHE))
|
||||
return bh;
|
||||
err = __ext4_ext_check(function, line, inode,
|
||||
ext_block_hdr(bh), depth, pblk);
|
||||
if (err)
|
||||
goto errout;
|
||||
if (!ext4_has_feature_journal(inode->i_sb) ||
|
||||
(inode->i_ino !=
|
||||
le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_journal_inum))) {
|
||||
err = __ext4_ext_check(function, line, inode,
|
||||
ext_block_hdr(bh), depth, pblk);
|
||||
if (err)
|
||||
goto errout;
|
||||
}
|
||||
set_buffer_verified(bh);
|
||||
/*
|
||||
* If this is a leaf block, cache all of its entries
|
||||
|
|
|
@ -5625,25 +5625,22 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
|
|||
up_write(&EXT4_I(inode)->i_data_sem);
|
||||
ext4_journal_stop(handle);
|
||||
if (error) {
|
||||
if (orphan)
|
||||
if (orphan && inode->i_nlink)
|
||||
ext4_orphan_del(NULL, inode);
|
||||
goto err_out;
|
||||
}
|
||||
}
|
||||
if (!shrink)
|
||||
if (!shrink) {
|
||||
pagecache_isize_extended(inode, oldsize, inode->i_size);
|
||||
|
||||
/*
|
||||
* Blocks are going to be removed from the inode. Wait
|
||||
* for dio in flight. Temporarily disable
|
||||
* dioread_nolock to prevent livelock.
|
||||
*/
|
||||
if (orphan) {
|
||||
if (!ext4_should_journal_data(inode)) {
|
||||
inode_dio_wait(inode);
|
||||
} else
|
||||
ext4_wait_for_tail_page_commit(inode);
|
||||
} else {
|
||||
/*
|
||||
* Blocks are going to be removed from the inode. Wait
|
||||
* for dio in flight.
|
||||
*/
|
||||
inode_dio_wait(inode);
|
||||
}
|
||||
if (orphan && ext4_should_journal_data(inode))
|
||||
ext4_wait_for_tail_page_commit(inode);
|
||||
down_write(&EXT4_I(inode)->i_mmap_sem);
|
||||
|
||||
rc = ext4_break_layouts(inode);
|
||||
|
|
Loading…
Reference in New Issue