On Tue, Apr 11, 2017 at 2:02 PM, Andreas Dilger <adilger@xxxxxxxxx> wrote: > On Apr 11, 2017, at 12:48 AM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> 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