From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH -v2] vfs: make unlink() return ENOENT in preference to EROFS Date: Mon, 6 Jun 2011 23:30:30 +0100 Message-ID: <20110606223030.GN11521@ZenIV.linux.org.uk> References: <1307393893-28672-1-git-send-email-tytso@mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, lacombar@gmail.com To: Theodore Ts'o Return-path: Content-Disposition: inline In-Reply-To: <1307393893-28672-1-git-send-email-tytso@mit.edu> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Jun 06, 2011 at 04:58:13PM -0400, Theodore Ts'o wrote: > If user space attempts to unlink a non-existent file, and the file > system is mounted read-only, return ENOENT instead of EROFS. Either > error code is arguably valid/correct, but ENOENT is a more specific > error message. Umm... I can live with that. What about rmdir(2)? We have similar situation there as well. If we care about one, why not the other? Mind you, I'm not at all convinced that it matters enough to bother, but yes, ENOENT is a bit more specific (and likelier to be handled by luserland code).