Merge remote-tracking branch 'ovl/rename2' into for-linus
[cascardo/linux.git] / fs / fat / namei_msdos.c
index ccd9f83..7d6a105 100644 (file)
@@ -596,12 +596,16 @@ error_inode:
 
 /***** Rename, a wrapper for rename_same_dir & rename_diff_dir */
 static int msdos_rename(struct inode *old_dir, struct dentry *old_dentry,
 
 /***** Rename, a wrapper for rename_same_dir & rename_diff_dir */
 static int msdos_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 super_block *sb = old_dir->i_sb;
        unsigned char old_msdos_name[MSDOS_NAME], new_msdos_name[MSDOS_NAME];
        int err, is_hid;
 
 {
        struct super_block *sb = old_dir->i_sb;
        unsigned char old_msdos_name[MSDOS_NAME], new_msdos_name[MSDOS_NAME];
        int err, is_hid;
 
+       if (flags & ~RENAME_NOREPLACE)
+               return -EINVAL;
+
        mutex_lock(&MSDOS_SB(sb)->s_lock);
 
        err = msdos_format_name(old_dentry->d_name.name,
        mutex_lock(&MSDOS_SB(sb)->s_lock);
 
        err = msdos_format_name(old_dentry->d_name.name,