Message ID | 20250115094702.504610-7-hch@lst.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/8] lockref: remove lockref_put_not_zero | expand |
diff --git a/fs/dcache.c b/fs/dcache.c index b4d5e9e1e43d..1a01d7a6a7a9 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1681,9 +1681,8 @@ static struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name) /* Make sure we always see the terminating NUL character */ smp_store_release(&dentry->d_name.name, dname); /* ^^^ */ - dentry->d_lockref.count = 1; dentry->d_flags = 0; - spin_lock_init(&dentry->d_lock); + lockref_init(&dentry->d_lockref, 1); seqcount_spinlock_init(&dentry->d_seq, &dentry->d_lock); dentry->d_inode = NULL; dentry->d_parent = dentry;
Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/dcache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)