]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/jfs/namei.c
make d_splice_alias(ERR_PTR(err), dentry) = ERR_PTR(err)
[mirror_ubuntu-bionic-kernel.git] / fs / jfs / namei.c
index 865df16a6cf3b23d230ccfa14a1f45eaf900998a..247331551992bec8b1876f3c745f66e0c0dd0e7b 100644 (file)
@@ -360,8 +360,6 @@ static int jfs_rmdir(struct inode *dip, struct dentry *dentry)
 
        jfs_info("jfs_rmdir: dip:0x%p name:%s", dip, dentry->d_name.name);
 
-       dentry_unhash(dentry);
-
        /* Init inode for quota operations. */
        dquot_initialize(dip);
        dquot_initialize(ip);
@@ -1097,9 +1095,6 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
        jfs_info("jfs_rename: %s %s", old_dentry->d_name.name,
                 new_dentry->d_name.name);
 
-       if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode))
-               dentry_unhash(new_dentry);
-
        dquot_initialize(old_dir);
        dquot_initialize(new_dir);
 
@@ -1486,10 +1481,8 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, struc
        }
 
        ip = jfs_iget(dip->i_sb, inum);
-       if (IS_ERR(ip)) {
+       if (IS_ERR(ip))
                jfs_err("jfs_lookup: iget failed on inum %d", (uint) inum);
-               return ERR_CAST(ip);
-       }
 
        return d_splice_alias(ip, dentry);
 }
@@ -1602,8 +1595,6 @@ out:
 
 static int jfs_ci_revalidate(struct dentry *dentry, struct nameidata *nd)
 {
-       if (nd && nd->flags & LOOKUP_RCU)
-               return -ECHILD;
        /*
         * This is not negative dentry. Always valid.
         *
@@ -1629,10 +1620,8 @@ static int jfs_ci_revalidate(struct dentry *dentry, struct nameidata *nd)
         * case sensitive name which is specified by user if this is
         * for creation.
         */
-       if (!(nd->flags & (LOOKUP_CONTINUE | LOOKUP_PARENT))) {
-               if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
-                       return 0;
-       }
+       if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
+               return 0;
        return 1;
 }