Skip to content
  • Lepton Wu's avatar
    reiserfs: workaround for dead loop in finish_unfinished · fb46f341
    Lepton Wu authored
    
    
    There is possible dead loop in finish_unfinished function.
    
    In most situation, the call chain iput -> ...  -> reiserfs_delete_inode ->
    remove_save_link will success.  But for some reason such as data
    corruption, reiserfs_delete_inode fails on reiserfs_do_truncate ->
    search_for_position_by_key.
    
    Then remove_save_link won't be called.  We always get the same
    "save_link_key" in the while loop in finish_unfinished function.  The
    following patch adds a check for the possible dead loop and just remove
    save link when deap loop.
    
    [akpm@linux-foundation.org: cleanups]
    Signed-off-by: default avatarLepton Wu <ytht.net@gmail.com>
    Cc: Chris Mason <chris.mason@oracle.com>
    Cc: Jeff Mahoney <jeffm@suse.com>
    Cc: "Vladimir V. Saveliev" <vs@namesys.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    fb46f341