diff options
| author | Miklos Szeredi <[email protected]> | 2016-09-27 09:03:58 +0000 |
|---|---|---|
| committer | Miklos Szeredi <[email protected]> | 2016-09-27 09:03:58 +0000 |
| commit | 1cd66c93ba8cdb873258f58ae6a817b28a02bcc3 (patch) | |
| tree | f9a1f49b000c9959c5b278eae175b996ade3a7cd /fs/nfs/proc.c | |
| parent | libfs: support RENAME_NOREPLACE in simple_rename() (diff) | |
| download | kernel-1cd66c93ba8cdb873258f58ae6a817b28a02bcc3.tar.gz kernel-1cd66c93ba8cdb873258f58ae6a817b28a02bcc3.zip | |
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 <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-by: David Howells <[email protected]> [AFS]
Acked-by: Mike Marshall <[email protected]>
Cc: Eric Van Hensbergen <[email protected]>
Cc: Ilya Dryomov <[email protected]>
Cc: Jan Harkes <[email protected]>
Cc: Tyler Hicks <[email protected]>
Cc: Oleg Drokin <[email protected]>
Cc: Trond Myklebust <[email protected]>
Cc: Mark Fasheh <[email protected]>
Diffstat (limited to 'fs/nfs/proc.c')
| -rw-r--r-- | fs/nfs/proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index b7bca8303989..380d0b787983 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c @@ -685,7 +685,7 @@ static const struct inode_operations nfs_dir_inode_operations = { .mkdir = nfs_mkdir, .rmdir = nfs_rmdir, .mknod = nfs_mknod, - .rename = nfs_rename, + .rename2 = nfs_rename, .permission = nfs_permission, .getattr = nfs_getattr, .setattr = nfs_setattr, |
