diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-09-27 12:03:58 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2016-09-27 12:03:58 +0300 |
commit | 18fc84dafaac1fd63d5e6e600058eada8fc7914b (patch) | |
tree | d48fc9b796c75e21ed5fbc7777755dd824941b46 /fs/namei.c | |
parent | 1cd66c93ba8cdb873258f58ae6a817b28a02bcc3 (diff) |
vfs: remove unused i_op->rename
No in-tree uses remain.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/namei.c b/fs/namei.c index adb04146df09..02803bd6cbad 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -4369,12 +4369,9 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry, if (error) return error; - if (!old_dir->i_op->rename && !old_dir->i_op->rename2) + if (!old_dir->i_op->rename2) return -EPERM; - if (flags && !old_dir->i_op->rename2) - return -EINVAL; - /* * If we are going to change the parent - check write permissions, * we'll need to flip '..'. @@ -4428,14 +4425,8 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry, if (error) goto out; } - if (!old_dir->i_op->rename2) { - error = old_dir->i_op->rename(old_dir, old_dentry, - new_dir, new_dentry); - } else { - WARN_ON(old_dir->i_op->rename != NULL); - error = old_dir->i_op->rename2(old_dir, old_dentry, - new_dir, new_dentry, flags); - } + error = old_dir->i_op->rename2(old_dir, old_dentry, + new_dir, new_dentry, flags); if (error) goto out; |