Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <viro@zeniv.linux.org.uk>

Al Viro e6d68367 6fa6e4e2

+3 -9
+3 -9
fs/coda/dir.c
··· 479 479 */ 480 480 static int coda_dentry_delete(const struct dentry * dentry) 481 481 { 482 - struct inode *inode; 483 - struct coda_inode_info *cii; 482 + struct inode *inode = d_inode(dentry); 484 483 485 - if (d_really_is_negative(dentry)) 484 + if (!inode) 486 485 return 0; 487 486 488 - inode = d_inode(dentry); 489 - if (!inode) 490 - return 1; 491 - 492 - cii = ITOC(inode); 493 - if (cii->c_flags & C_PURGE) 487 + if (ITOC(inode)->c_flags & C_PURGE) 494 488 return 1; 495 489 496 490 return 0;