Commit 4a3b0a49 authored by Jan Blunck's avatar Jan Blunck Committed by Linus Torvalds

[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: default avatarVandana Rungta <>
Signed-off-by: default avatarJan Blunck <>
Cc: Al Viro <>
Cc: Neil Brown <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 068135e6
......@@ -709,7 +709,7 @@ EXPORT_SYMBOL(iunique);
struct inode *igrab(struct inode *inode)
if (!(inode->i_state & (I_FREEING|I_WILL_FREE)))
if (!(inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment