mirror of
https://github.com/S3NEO/android_kernel_samsung_msm8226.git
synced 2024-11-07 03:47:13 +00:00
vfs: avoid call to inode_lru_list_del() if possible
inode_lru_list_del() is expensive because of per superblock lru locking, while some inodes are not in lru list. Adding a check in iput_final() can speedup pipe/sockets workloads on SMP. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
f2ee7abf4c
commit
c4ae0c6545
1 changed files with 2 additions and 1 deletions
|
@ -1330,6 +1330,7 @@ static void iput_final(struct inode *inode)
|
|||
}
|
||||
|
||||
inode->i_state |= I_FREEING;
|
||||
if (!list_empty(&inode->i_lru))
|
||||
inode_lru_list_del(inode);
|
||||
spin_unlock(&inode->i_lock);
|
||||
|
||||
|
|
Loading…
Reference in a new issue