From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932975AbcGICwq (ORCPT ); Fri, 8 Jul 2016 22:52:46 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:40300 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932706AbcGICwh (ORCPT ); Fri, 8 Jul 2016 22:52:37 -0400 Date: Sat, 9 Jul 2016 03:52:30 +0100 From: Al Viro To: Oleg Drokin Cc: Jeff Layton , "J. Bruce Fields" , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM Message-ID: <20160709025230.GR14480@ZenIV.linux.org.uk> References: <1467942466-3081422-1-git-send-email-green@linuxhacker.ru> <1467975747.24149.16.camel@poochiereds.net> <05872587-E1A0-4714-AF43-7070D72D930C@linuxhacker.ru> <1467993208.27907.17.camel@poochiereds.net> <9F6401BF-9F1A-4D6C-BE36-BE2064EC9BF3@linuxhacker.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9F6401BF-9F1A-4D6C-BE36-BE2064EC9BF3@linuxhacker.ru> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 08, 2016 at 11:59:50AM -0400, Oleg Drokin wrote: > "If path names a symbolic link, mkdir() shall fail and set errno to [EEXIST]." > > This sounds pretty straightforward to me, no? > Since it does not matter that we do not have write permissions here, because > the name already exists. When more than one condition applies, we have every right to return any of them. POSIX does *NOT* specify the order of checks. Never had.