diff options
author | Alan Cox <alan@linux.intel.com> | 2012-09-19 10:49:51 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 22:20:19 -0400 |
commit | 1fe0c0230a7c2d5f4061e681a3f3be9512446d23 (patch) | |
tree | 611103e01c1bc579436d376176a69cf4d903c6f5 /fs | |
parent | 2903ff019b346ab8d36ebbf54853c3aaf6590608 (diff) |
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 <alan@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dcache.c | 2 |
1 files changed, 1 insertions, 1 deletions
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: | |||
2109 | inode = dentry->d_inode; | 2109 | inode = dentry->d_inode; |
2110 | isdir = S_ISDIR(inode->i_mode); | 2110 | isdir = S_ISDIR(inode->i_mode); |
2111 | if (dentry->d_count == 1) { | 2111 | if (dentry->d_count == 1) { |
2112 | if (inode && !spin_trylock(&inode->i_lock)) { | 2112 | if (!spin_trylock(&inode->i_lock)) { |
2113 | spin_unlock(&dentry->d_lock); | 2113 | spin_unlock(&dentry->d_lock); |
2114 | cpu_relax(); | 2114 | cpu_relax(); |
2115 | goto again; | 2115 | goto again; |