[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFzg+ajoRHNEODuJbpD87S5qzbv8t2E7z9Mg09ENrYso0Q@mail.gmail.com>
Date: Wed, 12 Apr 2017 00:00:26 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andreas Dilger <adilger@...ger.ca>
Cc: Al Viro <viro@...iv.linux.org.uk>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [git pull] vfs fixes
On Tue, Apr 11, 2017 at 2:02 PM, Andreas Dilger <adilger@...ger.ca> wrote:
> On Apr 11, 2017, at 12:48 AM, Al Viro <viro@...IV.linux.org.uk> wrote:
>>
>> It's more obscure than I would like, and can grow into a bug one day, but...
>> nd_jump_root() can only return non-zero if you have LOOKUP_RCU.
>
> So possibly a comment like the following would be helpful:
>
> rcu_read_unlock(); /* nd_jump_root() returns if !LOOKUP_RCU */
>
> so that us mere mortals have a chance to understand this in the future?
That might be good, but the reason I noticed this at all was that I
looked at all those "if (LOOKUP_RCU)" in that function, and was
thinking that the whole function would be better being split up into
the RCU case and the non-RCU case. Because the two cases do have
shared code, but the sharing is almost less than the non-shared stuff.
And when I started doing that split to see what it looked like, that
rcu_read_unlock() really stood out like a sore thumb.
Linus
Powered by blists - more mailing lists