diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2014-07-23 09:15:30 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-08-07 14:40:09 -0400 |
commit | 7177a9c4b509eb357cc450256bc3cf39f1a1e639 (patch) | |
tree | 077ca807a8aea9b105ac5997e4cc99d4fdd3d0e9 /fs/fuse | |
parent | 2577d92ebd28dd9b3dacdfad6dcd81be0d21bbdf (diff) |
fs: call rename2 if exists
Christoph Hellwig suggests:
1) make vfs_rename call ->rename2 if it exists instead of ->rename
2) switch all filesystems that you're adding NOREPLACE support for to
use ->rename2
3) see how many ->rename instances we'll have left after a few
iterations of 2.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dir.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 0c6048247a34..de1d84af9f7c 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
@@ -845,12 +845,6 @@ static int fuse_rename2(struct inode *olddir, struct dentry *oldent, | |||
845 | return err; | 845 | return err; |
846 | } | 846 | } |
847 | 847 | ||
848 | static int fuse_rename(struct inode *olddir, struct dentry *oldent, | ||
849 | struct inode *newdir, struct dentry *newent) | ||
850 | { | ||
851 | return fuse_rename2(olddir, oldent, newdir, newent, 0); | ||
852 | } | ||
853 | |||
854 | static int fuse_link(struct dentry *entry, struct inode *newdir, | 848 | static int fuse_link(struct dentry *entry, struct inode *newdir, |
855 | struct dentry *newent) | 849 | struct dentry *newent) |
856 | { | 850 | { |
@@ -2024,7 +2018,6 @@ static const struct inode_operations fuse_dir_inode_operations = { | |||
2024 | .symlink = fuse_symlink, | 2018 | .symlink = fuse_symlink, |
2025 | .unlink = fuse_unlink, | 2019 | .unlink = fuse_unlink, |
2026 | .rmdir = fuse_rmdir, | 2020 | .rmdir = fuse_rmdir, |
2027 | .rename = fuse_rename, | ||
2028 | .rename2 = fuse_rename2, | 2021 | .rename2 = fuse_rename2, |
2029 | .link = fuse_link, | 2022 | .link = fuse_link, |
2030 | .setattr = fuse_setattr, | 2023 | .setattr = fuse_setattr, |