From: Alan Cox Date: Wed, 19 Sep 2012 14:49:51 +0000 (+0100) Subject: vfs: delete surplus inode NULL check X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1fe0c0230a7c2d5f4061e681a3f3be9512446d23;p=linux-beck.git vfs: delete surplus inode NULL check Each iteration of d_delete we reload inode from dentry->d_inode and then call S_ISDIR(inode-i_mode), so inode cannot possibly be NULL shortly afterwards unless something went horribly wrong. Signed-off-by: Alan Cox Signed-off-by: Al Viro --- diff --git a/fs/dcache.c b/fs/dcache.c index 16521a9f2038..fbee67b92651 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -2109,7 +2109,7 @@ again: inode = dentry->d_inode; isdir = S_ISDIR(inode->i_mode); if (dentry->d_count == 1) { - if (inode && !spin_trylock(&inode->i_lock)) { + if (!spin_trylock(&inode->i_lock)) { spin_unlock(&dentry->d_lock); cpu_relax(); goto again;