From: Eric Biggers <ebiggers3@gmail.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: fs/namei.c: Misuse of sequence counts?
Date: Sat, 11 Oct 2014 23:51:42 -0500 [thread overview]
Message-ID: <20141012045142.GC24463@zzz> (raw)
In-Reply-To: <20141012043737.GO7996@ZenIV.linux.org.uk>
On Sun, Oct 12, 2014 at 05:37:37AM +0100, Al Viro wrote:
>
> Gets clumsy in set_root_rcu() - you do *not* want it to bugger nd->inode
> when done by follow_dotdot_rcu(), so we'd need either some indication which
> caller it is, or something like struct inode **inode in argument list,
> with NULL passed from follow_dotdot_rcu(), while path_init() would give
> it &nd->inode...
>
> Doable, but unpleasant. And the price of that check is trivial - after all,
> in case we *don't* bugger off immediately, we have that ->d_seq in cache -
> we'd fetched it just before.
Or set_root_rcu() can be hand-inlined, like the AT_FDCWD case. Then the only
caller of set_root_rcu() would be follow_dotdot_rcu(), and the unnecessary
__read_seqcount_begin() could be removed. (Probably gcc can't optimize it out
currently, because of the ACCESS_ONCE().)
next prev parent reply other threads:[~2014-10-12 4:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-11 22:58 fs/namei.c: Misuse of sequence counts? Eric Biggers
2014-10-11 23:46 ` Al Viro
2014-10-12 3:55 ` Eric Biggers
2014-10-12 4:29 ` Al Viro
2014-10-12 0:12 ` Al Viro
2014-10-12 4:01 ` Eric Biggers
2014-10-12 4:37 ` Al Viro
2014-10-12 4:51 ` Eric Biggers [this message]
2014-10-12 5:08 ` Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141012045142.GC24463@zzz \
--to=ebiggers3@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).