Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752585AbdDLHAa (ORCPT ); Wed, 12 Apr 2017 03:00:30 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:33773 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751079AbdDLHA1 (ORCPT ); Wed, 12 Apr 2017 03:00:27 -0400 MIME-Version: 1.0 In-Reply-To: <73D0730D-C63C-47EE-AE56-5A0B6A2432D8@dilger.ca> References: <20170409053956.GB29622@ZenIV.linux.org.uk> <20170411064840.GG29622@ZenIV.linux.org.uk> <73D0730D-C63C-47EE-AE56-5A0B6A2432D8@dilger.ca> From: Linus Torvalds Date: Wed, 12 Apr 2017 00:00:26 -0700 X-Google-Sender-Auth: ejV6PlpVeYmB8okwVnh5LYvfxDs Message-ID: Subject: Re: [git pull] vfs fixes To: Andreas Dilger Cc: Al Viro , Linux Kernel Mailing List , linux-fsdevel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1004 Lines: 22 On Tue, Apr 11, 2017 at 2:02 PM, Andreas Dilger wrote: > On Apr 11, 2017, at 12:48 AM, Al Viro 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