Commit 7cb85324 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: unlink: casefold d_invalidate



casefolding results in additional aliases on lookup for the
non-casefolded names - these need invalidating on unlink.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 9cdde3c7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -847,6 +847,11 @@ int __bch2_unlink(struct inode *vdir, struct dentry *dentry,
		 */
		set_nlink(&inode->v, 0);
	}

	if (IS_CASEFOLDED(vdir)) {
		d_invalidate(dentry);
		d_prune_aliases(&inode->v);
	}
err:
	bch2_trans_put(trans);
	bch2_unlock_inodes(INODE_UPDATE_LOCK, dir, inode);