]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
vfs: delete surplus inode NULL check
authorAlan Cox <alan@linux.intel.com>
Wed, 19 Sep 2012 14:49:51 +0000 (15:49 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 27 Sep 2012 02:20:19 +0000 (22:20 -0400)
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 <alan@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dcache.c

index 16521a9f203859a28a8804d3fb2f5f4cb894ed7f..fbee67b92651006807b8b385c57c31fa3e210a0c 100644 (file)
@@ -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;