Skip to content

Commit 7cb8532

Browse files
author
Kent Overstreet
committed
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: Kent Overstreet <kent.overstreet@linux.dev>
1 parent 9cdde3c commit 7cb8532

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fs/bcachefs/fs.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,11 @@ int __bch2_unlink(struct inode *vdir, struct dentry *dentry,
847847
*/
848848
set_nlink(&inode->v, 0);
849849
}
850+
851+
if (IS_CASEFOLDED(vdir)) {
852+
d_invalidate(dentry);
853+
d_prune_aliases(&inode->v);
854+
}
850855
err:
851856
bch2_trans_put(trans);
852857
bch2_unlock_inodes(INODE_UPDATE_LOCK, dir, inode);

0 commit comments

Comments
 (0)