diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-09-27 05:03:58 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2016-09-27 05:03:58 -0400 |
commit | 1cd66c93ba8cdb873258f58ae6a817b28a02bcc3 (patch) | |
tree | f9a1f49b000c9959c5b278eae175b996ade3a7cd /fs/nfs/nfs3proc.c | |
parent | e0e0be8a835520e2f7c89f214dfda570922a1b90 (diff) |
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, 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>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: David Howells <dhowells@redhat.com> [AFS]
Acked-by: Mike Marshall <hubcap@omnibond.com>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ilya Dryomov <idryomov@gmail.com>
Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Cc: Tyler Hicks <tyhicks@canonical.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/nfs/nfs3proc.c')
-rw-r--r-- | fs/nfs/nfs3proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 698be9361280..a85fdae4a51f 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -893,7 +893,7 @@ static const struct inode_operations nfs3_dir_inode_operations = { | |||
893 | .mkdir = nfs_mkdir, | 893 | .mkdir = nfs_mkdir, |
894 | .rmdir = nfs_rmdir, | 894 | .rmdir = nfs_rmdir, |
895 | .mknod = nfs_mknod, | 895 | .mknod = nfs_mknod, |
896 | .rename = nfs_rename, | 896 | .rename2 = nfs_rename, |
897 | .permission = nfs_permission, | 897 | .permission = nfs_permission, |
898 | .getattr = nfs_getattr, | 898 | .getattr = nfs_getattr, |
899 | .setattr = nfs_setattr, | 899 | .setattr = nfs_setattr, |