From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] vfs: add noreplace_rename2() Date: Tue, 13 May 2014 07:05:57 -0700 Message-ID: <20140513140557.GA30660@infradead.org> References: <20140513135622.GB17233@tucsk.piliscsaba.szeredi.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Al Viro , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Chris Mason , Jan Kara , Theodore Ts'o , Jaegeuk Kim , OGAWA Hirofumi , Mikulas Patocka , David Woodhouse , Dave Kleikamp , Joern Engel , Ryusuke Konishi , Bob Copeland , Christoph Hellwig , Artem Bityutskiy , Dave Chinner To: Miklos Szeredi Return-path: Content-Disposition: inline In-Reply-To: <20140513135622.GB17233@tucsk.piliscsaba.szeredi.hu> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, May 13, 2014 at 03:56:22PM +0200, Miklos Szeredi wrote: > From: Miklos Szeredi > > RENAME_NOREPLACE is trivial to implement for most filesystems. This adds a > helper that can be assigned to ->rename2() and calls ->rename(). > > Only suitable for local filesystems, i.e. those that cannot have files > "spontaneously" appear (like NFS and friends). I don't like this approach at all. Please bite the bullet and rename ->rename2 to ->rename and all the proper rejecting of non-supported flags intstead of further locking down the duplication.