[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <22233.1523002135@warthog.procyon.org.uk>
Date: Fri, 06 Apr 2018 09:08:55 +0100
From: David Howells <dhowells@...hat.com>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: dhowells@...hat.com, torvalds@...ux-foundation.org,
linux-fsdevel@...r.kernel.org, linux-afs@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/20] afs: Implement @sys substitution handling
Al Viro <viro@...IV.linux.org.uk> wrote:
> > +static struct dentry *afs_lookup_atsys(struct inode *dir, struct dentry *dentry,
> > + struct key *key)
> > +{
>
> > + ret = lookup_one_len(buf, parent, len);
>
> Er... Parent is locked only shared here and lookup_one_len() seriously
> depends upon exclusive lock. As it is, race with lookup of the full name
> will mess the things up very badly.
How should it be done? Do I have to use d_alloc_parallel(), analogous to
lookup_slow() without taking the rwsem again?
David
PS: Can you stick a banner comment on d_alloc_parallel() describing it?
Powered by blists - more mailing lists