fs: make remaining filesystems use .rename2
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 17 Aug 2016 07:15:30 +0000 (09:15 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 17 Aug 2016 07:15:30 +0000 (09:15 +0200)
commit1423ecc06577814f7ad1fb2a34be6b6c649bee56
tree932790ea6ae49f48c8fbcccc2368a2055f05fe56
parent1ada96019d8aba077b605d4d2bbdde888a1fc48b
fs: make remaining filesystems use .rename2

This is trivial to do:

 - add flags argument to foo_rename()
 - check if flags is zero
 - assign foo_rename() to .rename2 instead of .rename

This doesn't mean it's impossible to support RENAME_NOREPLACE for these
filesystems, but it is not trivial, like for local filesystems.
RENAME_NOREPLACE must guarantee atomicity (i.e. it shouldn't be possible
for a file to be created on one host while it is overwritten by rename on
another host).

Filesystems converted:

9p, afs, ceph, coda, ecryptfs, exofs, kernfs, lustre, ncpfs, nfs, ocfs2,
orangefs.

After this, we can get rid of the duplicate interfaces for rename.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Ilya Dryomov <idryomov@gmail.com>
Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Cc: Tyler Hicks <tyhicks@canonical.com>
Cc: Boaz Harrosh <ooo@electrozaur.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Mike Marshall <hubcap@omnibond.com>
18 files changed:
drivers/staging/lustre/lustre/llite/namei.c
fs/9p/v9fs.h
fs/9p/vfs_inode.c
fs/9p/vfs_inode_dotl.c
fs/afs/dir.c
fs/ceph/dir.c
fs/coda/dir.c
fs/ecryptfs/inode.c
fs/exofs/namei.c
fs/kernfs/dir.c
fs/ncpfs/dir.c
fs/nfs/dir.c
fs/nfs/internal.h
fs/nfs/nfs3proc.c
fs/nfs/nfs4proc.c
fs/nfs/proc.c
fs/ocfs2/namei.c
fs/orangefs/namei.c
This page took 0.026987 seconds and 5 git commands to generate.