lkml.org 
[lkml]   [2017]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [git pull] vfs fixes
On Tue, Apr 11, 2017 at 2:02 PM, Andreas Dilger <adilger@dilger.ca> wrote:
> On Apr 11, 2017, at 12:48 AM, Al Viro <viro@ZenIV.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

\
 
 \ /
  Last update: 2017-04-12 09:01    [W:0.059 / U:3.040 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site