fs: rename "rename2" i_op to "rename"
[cascardo/linux.git] / fs / udf / namei.c
index a2ba11e..17e9d4a 100644 (file)
@@ -1093,7 +1093,8 @@ static int udf_link(struct dentry *old_dentry, struct inode *dir,
  * higher-level routines.
  */
 static int udf_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 inode *old_inode = d_inode(old_dentry);
        struct inode *new_inode = d_inode(new_dentry);
@@ -1105,6 +1106,9 @@ static int udf_rename(struct inode *old_dir, struct dentry *old_dentry,
        struct kernel_lb_addr tloc;
        struct udf_inode_info *old_iinfo = UDF_I(old_inode);
 
+       if (flags & ~RENAME_NOREPLACE)
+               return -EINVAL;
+
        ofi = udf_find_entry(old_dir, &old_dentry->d_name, &ofibh, &ocfi);
        if (IS_ERR(ofi)) {
                retval = PTR_ERR(ofi);
@@ -1250,7 +1254,7 @@ static struct dentry *udf_get_parent(struct dentry *child)
        brelse(fibh.sbh);
 
        tloc = lelb_to_cpu(cfi.icb.extLocation);
-       inode = udf_iget(d_inode(child)->i_sb, &tloc);
+       inode = udf_iget(child->d_sb, &tloc);
        if (IS_ERR(inode))
                return ERR_CAST(inode);