Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752331AbdHJCQK (ORCPT ); Wed, 9 Aug 2017 22:16:10 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:59593 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974AbdHJCQI (ORCPT ); Wed, 9 Aug 2017 22:16:08 -0400 X-ME-Sender: X-Sasl-enc: 474/ym6f49ZP8sutkrWKTT0RvFn+zPFi8w/h65i2LCEr 1502331367 Subject: Re: [PATCH 1/3] autofs - fix AT_NO_AUTOMOUNT not being honored From: Ian Kent To: David Howells Cc: Andrew Morton , autofs mailing list , Ondrej Holy , Colin Walters , Kernel Mailing List , linux-fsdevel References: <150216641255.11652.4204561328197919771.stgit@pluto.themaw.net> <4689.1502267949@warthog.procyon.org.uk> Message-ID: <253371b7-ce7d-1b97-bbb4-cf2263d6dd28@themaw.net> Date: Thu, 10 Aug 2017 10:16:02 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 866 Lines: 24 On 09/08/17 17:51, Ian Kent wrote: > On 09/08/17 16:39, David Howells wrote: >> Ian Kent wrote: >> >>> In order to handle the AT_NO_AUTOMOUNT for both system calls the >>> negative dentry case in follow_automount() needs to be changed to >>> return ENOENT when the LOOKUP_AUTOMOUNT flag is clear (and the other >>> required flags are clear). >> >> Should the be EREMOTE instead of ENOENT? > > I thought about that and ended up thinking ENOENT was more sensible > but I'll look at it again. I think EREMOTE and ENOENT both are inaccurate. There's no way to know if the negative dentry corresponds to a valid map key, and we've seen increasing lookups from userspace applications for invalid directories, so I'm not sure. I went with ENOENT but I guess we could use EREMOTE, what's your thinking on why EREMOTE might be better than ENOENT? Ian