Re: [PATCH 6/8] dcache: use lockref_init for d_lockref

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 15, 2025 at 08:30:24PM +0000, Al Viro wrote:
> On Thu, Jan 16, 2025 at 07:13:23AM +1100, Dave Chinner wrote:
> > On Wed, Jan 15, 2025 at 10:46:42AM +0100, Christoph Hellwig wrote:
> > > Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> > > ---
> > >  fs/dcache.c | 3 +--
> > >  1 file changed, 1 insertion(+), 2 deletions(-)
> > > 
> > > 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);
> > 
> > Looks wrong -  dentry->d_lock is not part of dentry->d_lockref...
> 
> include/linux/dcache.h:80:#define d_lock  d_lockref.lock

Ah, I missed that subtlety (obviously). Carry on!

-Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux