mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
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>
This commit is contained in:
parent
2903ff019b
commit
1fe0c0230a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user