Skip to content

Commit 8c32b87

Browse files
Christoph Hellwigbrauner
authored andcommitted
dcache: use lockref_init for d_lockref
Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250115094702.504610-7-hch@lst.de Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 63440d1 commit 8c32b87

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/dcache.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,9 +1681,8 @@ static struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
16811681
/* Make sure we always see the terminating NUL character */
16821682
smp_store_release(&dentry->d_name.name, dname); /* ^^^ */
16831683

1684-
dentry->d_lockref.count = 1;
16851684
dentry->d_flags = 0;
1686-
spin_lock_init(&dentry->d_lock);
1685+
lockref_init(&dentry->d_lockref, 1);
16871686
seqcount_spinlock_init(&dentry->d_seq, &dentry->d_lock);
16881687
dentry->d_inode = NULL;
16891688
dentry->d_parent = dentry;

0 commit comments

Comments
 (0)