提交 1fe0c023 编写于 作者: A Alan Cox 提交者: Al Viro

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: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 2903ff01
...@@ -2109,7 +2109,7 @@ void d_delete(struct dentry * dentry) ...@@ -2109,7 +2109,7 @@ void d_delete(struct dentry * dentry)
inode = dentry->d_inode; inode = dentry->d_inode;
isdir = S_ISDIR(inode->i_mode); isdir = S_ISDIR(inode->i_mode);
if (dentry->d_count == 1) { if (dentry->d_count == 1) {
if (inode && !spin_trylock(&inode->i_lock)) { if (!spin_trylock(&inode->i_lock)) {
spin_unlock(&dentry->d_lock); spin_unlock(&dentry->d_lock);
cpu_relax(); cpu_relax();
goto again; goto again;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册