From: Lepton Wu Date: Wed, 17 Oct 2007 06:30:04 +0000 (-0700) Subject: reiserfs: workaround for dead loop in finish_unfinished X-Git-Tag: v2.6.24-rc1~617 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb46f341d9868fe993626536c7449c2a1aec62a3;p=pandora-kernel.git reiserfs: workaround for dead loop in finish_unfinished 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: Lepton Wu Cc: Chris Mason Cc: Jeff Mahoney Cc: "Vladimir V. Saveliev" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed