Whamcloud - gitweb
LU-6142 llite: don't cast arg to d_lustre_invalid() 24/40824/2
authorMr NeilBrown <neilb@suse.de>
Thu, 15 Oct 2020 03:32:02 +0000 (14:32 +1100)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Feb 2021 22:10:39 +0000 (22:10 +0000)
There is no need to cast the arg to d_lustre_invalid() as it
is always of exactly the correct type.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I48b103abe2755a2d8892439974744dea232db515
Reviewed-on: https://review.whamcloud.com/40824
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/dcache.c

index c76382f..8de420f 100644 (file)
@@ -128,7 +128,7 @@ static int ll_ddelete(const struct dentry *de)
        LASSERT(de);
 
        CDEBUG(D_DENTRY, "%s dentry %pd (%p, parent %p, inode %p) %s%s\n",
-              d_lustre_invalid((struct dentry *)de) ? "deleting" : "keeping",
+              d_lustre_invalid(de) ? "deleting" : "keeping",
               de, de, de->d_parent, de->d_inode,
               d_unhashed((struct dentry *)de) ? "" : "hashed,",
               list_empty(&de->d_subdirs) ? "" : "subdirs");
@@ -136,7 +136,7 @@ static int ll_ddelete(const struct dentry *de)
        /* kernel >= 2.6.38 last refcount is decreased after this function. */
        LASSERT(ll_d_count(de) == 1);
 
-       if (d_lustre_invalid((struct dentry *)de))
+       if (d_lustre_invalid(de))
                RETURN(1);
        RETURN(0);
 }