Skip to content
  • Miklos Szeredi's avatar
    [PATCH] __wait_on_freeing_inode fix · 168a9fd6
    Miklos Szeredi authored
    
    
    This patch fixes queer behavior in __wait_on_freeing_inode().
    
    If I_LOCK was not set it called yield(), effectively busy waiting for the
    removal of the inode from the hash.  This change was introduced within
    "[PATCH] eliminate inode waitqueue hashtable" Changeset 1.1938.166.16 last
    october by wli.
    
    The solution is to restore the old behavior, of unconditionally waiting on
    the waitqueue.  It doesn't matter if I_LOCK is not set initally, the task
    will go to sleep, and wake up when wake_up_inode() is called from
    generic_delete_inode() after removing the inode from the hash chain.
    
    Comment is also updated to better reflect current behavior.
    
    This condition is very hard to trigger normally (simultaneous clear_inode()
    with iget()) so probably only heavy stress testing can reveal any change of
    behavior.
    
    Signed-off-by: default avatarMiklos Szeredi <miklos@szeredi.hu>
    Acked-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    168a9fd6