Skip to content

Commit 8c32b87

Browse files
Christoph Hellwigbrauner
authored andcommitted
dcache: use lockref_init for d_lockref
Signed-off-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent 63440d1 commit 8c32b87

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)