From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f66.google.com ([209.85.214.66]:34886 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758033AbcHYNLL (ORCPT ); Thu, 25 Aug 2016 09:11:11 -0400 Received: by mail-it0-f66.google.com with SMTP id f6so5862393ith.2 for ; Thu, 25 Aug 2016 06:11:10 -0700 (PDT) Date: Thu, 25 Aug 2016 08:52:36 -0400 From: Bob Copeland To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Al Viro , Jan Kara , Theodore Ts'o , Jaegeuk Kim , OGAWA Hirofumi , Mikulas Patocka , David Woodhouse , Dave Kleikamp , Ryusuke Konishi , Christoph Hellwig , Richard Weinberger Subject: Re: [PATCH 2/7] fs: support RENAME_NOREPLACE for local filesystems Message-ID: <20160825125236.GH29915@localhost> References: <1471961132-1675-1-git-send-email-mszeredi@redhat.com> <1471961132-1675-3-git-send-email-mszeredi@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471961132-1675-3-git-send-email-mszeredi@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Aug 23, 2016 at 04:05:27PM +0200, Miklos Szeredi wrote: omfs/dir.c b/fs/omfs/dir.c > index c8cbf3b60645..417511bbe362 100644 > --- a/fs/omfs/dir.c > +++ b/fs/omfs/dir.c > @@ -371,12 +371,16 @@ static bool omfs_fill_chain(struct inode *dir, struct dir_context *ctx, > } > > static int omfs_rename(struct inode *old_dir, struct dentry *old_dentry, > - struct inode *new_dir, struct dentry *new_dentry) > + struct inode *new_dir, struct dentry *new_dentry, > + unsigned int flags) > { > struct inode *new_inode = d_inode(new_dentry); > struct inode *old_inode = d_inode(old_dentry); > int err; > > + if (flags & ~RENAME_NOREPLACE) > + return -EINVAL; > + > if (new_inode) { > /* overwriting existing file/dir */ > err = omfs_remove(new_dir, new_dentry); > @@ -444,7 +448,7 @@ static int omfs_readdir(struct file *file, struct dir_context *ctx) omfs changes look fine. Acked-by: Bob Copeland -- Bob Copeland %% http://bobcopeland.com/