Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753879AbbHBA5q (ORCPT ); Sat, 1 Aug 2015 20:57:46 -0400 Received: from mail-io0-f171.google.com ([209.85.223.171]:34469 "EHLO mail-io0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752182AbbHBA5p (ORCPT ); Sat, 1 Aug 2015 20:57:45 -0400 MIME-Version: 1.0 In-Reply-To: <20150802002318.GZ17109@ZenIV.linux.org.uk> References: <20150731205036.GA3752@nautica> <20150801072603.GV17109@ZenIV.linux.org.uk> <20150802001402.GY17109@ZenIV.linux.org.uk> <20150802002318.GZ17109@ZenIV.linux.org.uk> Date: Sat, 1 Aug 2015 17:57:44 -0700 X-Google-Sender-Auth: E2pV5TrHzkhpqLgrprlU1Fa_t7c Message-ID: Subject: Re: [git pull] vfs.git spurious ENOTDIR fix From: Linus Torvalds To: Al Viro Cc: Dominique Martinet , Hugh Dickins , "J. Bruce Fields" , Dominique Martinet , Linux Kernel Mailing List , linux-fsdevel , David Howells 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: 1339 Lines: 38 On Sat, Aug 1, 2015 at 5:23 PM, Al Viro wrote: > > Branch head should be at 97242f9, just to make sure you get > the right one... Ok, merged in my tree. However, looking at this, I'm struck by how all the callers of "link_path_walk()" tend to have very similar patterns wrt error handling. And I'm wondering - wouldn't it be nicer to extend that pattern a bit more, and make the *callers* of link_path_walk() all do if (error) { if (nd->flags & LOOKUP_RCU) { if (unlazy_walk(nd, NULL, 0)) error = -ECHILD; } } and maybe even make that part of terminate_walk() that everybody calls after getting here. Because it's not just that "!d_can_lookup()" case that triggers it, you also have that pattern in the RCU error case for may_lookup(), and get_link(). So why don't we make the rule that *every* single error we get during an RCU walk should do that unlazy_walk() and turn the error into ECHILD on failure. Hmm? We're almost there as-is. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/