linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Miklos Szeredi <mszeredi@redhat.com>, linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
	Jan Kara <jack@suse.cz>, "Theodore Ts'o" <tytso@mit.edu>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
	Mikulas Patocka <mpatocka@redhat.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Dave Kleikamp <shaggy@kernel.org>,
	Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>,
	Bob Copeland <me@bobcopeland.com>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH 2/7] fs: support RENAME_NOREPLACE for local filesystems
Date: Tue, 23 Aug 2016 23:48:01 +0200	[thread overview]
Message-ID: <36353c40-6ec2-18dc-d7e5-bd4aab654266@nod.at> (raw)
In-Reply-To: <1471961132-1675-3-git-send-email-mszeredi@redhat.com>

Miklos,

On 23.08.2016 16:05, Miklos Szeredi wrote:
> diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
> index 4b86d3a738e1..23d1ebabc688 100644
> --- a/fs/ubifs/dir.c
> +++ b/fs/ubifs/dir.c
> @@ -966,7 +966,8 @@ static void unlock_3_inodes(struct inode *inode1, struct inode *inode2,
>  }
>  
>  static int ubifs_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 ubifs_info *c = old_dir->i_sb->s_fs_info;
>  	struct inode *old_inode = d_inode(old_dentry);
> @@ -984,6 +985,9 @@ static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry,
>  	struct timespec time;
>  	unsigned int uninitialized_var(saved_nlink);
>  
> +	if (flags & ~RENAME_NOREPLACE)
> +		return -EINVAL;
> +
>  	/*
>  	 * Budget request settings: deletion direntry, new direntry, removing
>  	 * the old inode, and changing old and new parent directory inodes.
> @@ -1179,7 +1183,7 @@ const struct inode_operations ubifs_dir_inode_operations = {
>  	.mkdir       = ubifs_mkdir,
>  	.rmdir       = ubifs_rmdir,
>  	.mknod       = ubifs_mknod,
> -	.rename      = ubifs_rename,
> +	.rename2     = ubifs_rename,
>  	.setattr     = ubifs_setattr,
>  	.getattr     = ubifs_getattr,
>  	.setxattr    = generic_setxattr,

For UBIFS,
Acked-by: Richard Weinberger <richard@nod.at>

Thanks,,
//richard

  reply	other threads:[~2016-08-23 21:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23 14:05 [PATCH 0/7] vfs: finish rename -> rename2 conversion Miklos Szeredi
2016-08-23 14:05 ` [PATCH 1/7] ncpfs: fix unused variable warning Miklos Szeredi
2016-08-23 14:05 ` [PATCH 2/7] fs: support RENAME_NOREPLACE for local filesystems Miklos Szeredi
2016-08-23 21:48   ` Richard Weinberger [this message]
2016-08-25 12:52   ` Bob Copeland
2016-09-08 13:55   ` Jan Kara
2016-08-23 14:05 ` [PATCH 3/7] libfs: support RENAME_NOREPLACE in simple_rename() Miklos Szeredi
2016-08-23 14:47   ` Greg Kroah-Hartman
2016-08-23 14:05 ` [PATCH 4/7] fs: make remaining filesystems use .rename2 Miklos Szeredi
2016-08-23 14:47   ` Greg Kroah-Hartman
2016-08-23 17:30     ` Mike Marshall
2016-08-23 16:24   ` Boaz Harrosh
2016-08-23 16:29     ` Boaz Harrosh
2016-08-23 14:05 ` [PATCH 5/7] vfs: remove unused i_op->rename Miklos Szeredi
2016-08-23 14:05 ` [PATCH 6/7] fs: rename "rename2" i_op to "rename" Miklos Szeredi
2016-08-23 14:05 ` [PATCH 7/7] vfs: add note about i_op->rename changes to porting Miklos Szeredi
2016-08-23 15:36 ` [PATCH 4/7] fs: make remaining filesystems use .rename2 David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36353c40-6ec2-18dc-d7e5-bd4aab654266@nod.at \
    --to=richard@nod.at \
    --cc=dwmw2@infradead.org \
    --cc=hch@infradead.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=jack@suse.cz \
    --cc=jaegeuk@kernel.org \
    --cc=konishi.ryusuke@lab.ntt.co.jp \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@bobcopeland.com \
    --cc=mpatocka@redhat.com \
    --cc=mszeredi@redhat.com \
    --cc=shaggy@kernel.org \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).