mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 07:29:42 -05:00
[PATCH] igrab() should check for I_CLEAR
When igrab() is calling __iget() on an inode it should check if clear_inode() has been called on the inode already. Otherwise there is a race window between clear_inode() and destroy_inode() where igrab() calls __iget() which leads to already free inodes on the inode lists. Signed-off-by: Vandana Rungta <[email protected]> Signed-off-by: Jan Blunck <[email protected]> Cc: Al Viro <[email protected]> Cc: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
068135e635
commit
4a3b0a490d
1 changed files with 1 additions and 1 deletions
|
|
@ -709,7 +709,7 @@ EXPORT_SYMBOL(iunique);
|
|||
struct inode *igrab(struct inode *inode)
|
||||
{
|
||||
spin_lock(&inode_lock);
|
||||
if (!(inode->i_state & (I_FREEING|I_WILL_FREE)))
|
||||
if (!(inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)))
|
||||
__iget(inode);
|
||||
else
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue