d_really_is_negative(dentry) is a check for d_inode(dentry) being NULL; rechecking that is pointless (and no, it can't race - the caller is holding ->d_lock, so ->d_inode is stable) Signed-off-by: Al Viro --- fs/coda/dir.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/fs/coda/dir.c b/fs/coda/dir.c index 799c3d3ea12c..2a5048bab635 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c @@ -479,18 +479,12 @@ static int coda_dentry_revalidate(struct inode *dir, const struct qstr *name, */ static int coda_dentry_delete(const struct dentry * dentry) { - struct inode *inode; - struct coda_inode_info *cii; - - if (d_really_is_negative(dentry)) - return 0; + struct inode *inode = d_inode(dentry); - inode = d_inode(dentry); if (!inode) - return 1; + return 0; - cii = ITOC(inode); - if (cii->c_flags & C_PURGE) + if (ITOC(inode)->c_flags & C_PURGE) return 1; return 0; -- 2.47.3