Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35efb51e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents b2ad8136 66883da1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+8 −4
Original line number Diff line number Diff line
@@ -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;
	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
+10 −13
Original line number Diff line number Diff line
@@ -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);

		} else {
			/*
			 * Blocks are going to be removed from the inode. Wait
		 * for dio in flight.  Temporarily disable
		 * dioread_nolock to prevent livelock.
			 * for dio in flight.
			 */
		if (orphan) {
			if (!ext4_should_journal_data(inode)) {
			inode_dio_wait(inode);
			} else
				ext4_wait_for_tail_page_commit(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);