mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
2577d92ebd
commit
7177a9c4b5
3 changed files with 3 additions and 10 deletions
|
|
@ -845,12 +845,6 @@ static int fuse_rename2(struct inode *olddir, struct dentry *oldent,
|
|||
return err;
|
||||
}
|
||||
|
||||
static int fuse_rename(struct inode *olddir, struct dentry *oldent,
|
||||
struct inode *newdir, struct dentry *newent)
|
||||
{
|
||||
return fuse_rename2(olddir, oldent, newdir, newent, 0);
|
||||
}
|
||||
|
||||
static int fuse_link(struct dentry *entry, struct inode *newdir,
|
||||
struct dentry *newent)
|
||||
{
|
||||
|
|
@ -2024,7 +2018,6 @@ static const struct inode_operations fuse_dir_inode_operations = {
|
|||
.symlink = fuse_symlink,
|
||||
.unlink = fuse_unlink,
|
||||
.rmdir = fuse_rmdir,
|
||||
.rename = fuse_rename,
|
||||
.rename2 = fuse_rename2,
|
||||
.link = fuse_link,
|
||||
.setattr = fuse_setattr,
|
||||
|
|
|
|||
Loading…
Reference in a new issue