]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ubifs/dir.c
UBIFS: remove unneeded check
[karo-tx-linux.git] / fs / ubifs / dir.c
index 0d1ab8967a4c7f301b50e98067ebb4269b29fde8..5c96f1fb70166dbd75217692722d9e727be1d031 100644 (file)
@@ -219,15 +219,7 @@ static struct dentry *ubifs_lookup(struct inode *dir, struct dentry *dentry,
 
        err = ubifs_tnc_lookup_nm(c, &key, dent, &dentry->d_name);
        if (err) {
-               /*
-                * Do not hash the direntry if parent 'i_nlink' is zero, because
-                * this has side-effects - '->delete_inode()' call will not be
-                * called for the parent orphan inode, because 'd_count' of its
-                * direntry will stay 1 (it'll be negative direntry I guess)
-                * and prevent 'iput_final()' until the dentry is destroyed due
-                * to unmount or memory pressure.
-                */
-               if (err == -ENOENT && dir->i_nlink != 0) {
+               if (err == -ENOENT) {
                        dbg_gen("not found");
                        goto done;
                }