author: Al Viro <viro@zeniv.linux.org.uk> 2016-10-10 23:02:51 -0400
committer: Al Viro <viro@zeniv.linux.org.uk> 2016-10-10 23:02:51 -0400
commit: 3873691e5ab34fa26948643d038a2b98c4437298
parent: c2050a454c7f123d7a57fa1d76ff61bd43643abb
Commit Summary:
Diffstat:
1 file changed, 5 insertions, 1 deletion
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index d4a1b2bfda64..bf46a2d7dc50 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -903,7 +903,8 @@ out:
}
static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry,
- struct inode *new_dir, struct dentry *new_dentry)
+ struct inode *new_dir, struct dentry *new_dentry,
+ unsigned int flags)
{
struct buffer_head *dotdot_bh;
struct msdos_dir_entry *dotdot_de;
@@ -914,6 +915,9 @@ static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry,
int err, is_dir, update_dotdot, corrupt = 0;
struct super_block *sb = old_dir->i_sb;
+ if (flags & ~RENAME_NOREPLACE)
+ return -EINVAL;
+
old_sinfo.bh = sinfo.bh = dotdot_bh = NULL;
old_inode = d_inode(old_dentry);
new_inode = d_inode(new_dentry);