Commit e6d68367 authored by Al Viro's avatar Al Viro
Browse files

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: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 6fa6e4e2
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -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;