From: Mr NeilBrown Date: Thu, 15 Oct 2020 03:32:02 +0000 (+1100) Subject: LU-6142 llite: don't cast arg to d_lustre_invalid() X-Git-Tag: 2.14.51~103 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;ds=sidebyside;h=8034d85f2b0e8aa18ddeb4fd4bc544d8fc99737c;hp=fca56be02b8fe074e7fce4bf8e9224a644cc7572;p=fs%2Flustre-release.git LU-6142 llite: don't cast arg to d_lustre_invalid() 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 Change-Id: I48b103abe2755a2d8892439974744dea232db515 Reviewed-on: https://review.whamcloud.com/40824 Reviewed-by: Andreas Dilger Tested-by: jenkins Reviewed-by: James Simmons Tested-by: Maloo --- diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c index c76382f..8de420f 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -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); }