]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ocfs2_find_match(): there's no such thing as NULL or negative ->d_parent
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 14 Nov 2023 17:20:22 +0000 (12:20 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 21 Dec 2023 17:53:30 +0000 (12:53 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ocfs2/dcache.c

index 04fc8344063a5a09b38251e63d4b165d69ec3f6c..a9b8688aaf30d75e32b5fbec663abcfb8c8dafda 100644 (file)
@@ -124,17 +124,10 @@ static int ocfs2_match_dentry(struct dentry *dentry,
        if (!dentry->d_fsdata)
                return 0;
 
-       if (!dentry->d_parent)
-               return 0;
-
        if (skip_unhashed && d_unhashed(dentry))
                return 0;
 
        parent = d_inode(dentry->d_parent);
-       /* Negative parent dentry? */
-       if (!parent)
-               return 0;
-
        /* Name is in a different directory. */
        if (OCFS2_I(parent)->ip_blkno != parent_blkno)
                return 0;