From: Al Viro Date: Sun, 1 Feb 2026 17:18:30 +0000 (-0500) Subject: sanitize coda_dentry_delete() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6d683673167763ac364108b0b0eb10d0c605868;p=thirdparty%2Fkernel%2Flinux.git sanitize coda_dentry_delete() 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 --- 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 @@ out: */ 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;