Merge remote-tracking branch 'ovl/rename2' into for-linus
[cascardo/linux.git] / fs / jfs / namei.c
index b05d0b4..d1d7c43 100644 (file)
@@ -1078,7 +1078,8 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
  * FUNCTION:   rename a file or directory
  */
 static int jfs_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 btstack btstack;
        ino_t ino;
@@ -1097,6 +1098,8 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
        s64 new_size = 0;
        int commit_flag;
 
+       if (flags & ~RENAME_NOREPLACE)
+               return -EINVAL;
 
        jfs_info("jfs_rename: %pd %pd", old_dentry, new_dentry);
 
@@ -1281,7 +1284,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
        old_ip->i_ctime = current_time(old_ip);
        mark_inode_dirty(old_ip);
 
-       new_dir->i_ctime = new_dir->i_mtime = current_fs_time(new_dir->i_sb);
+       new_dir->i_ctime = new_dir->i_mtime = current_time(new_dir);
        mark_inode_dirty(new_dir);
 
        /* Build list of inodes modified by this transaction */