]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xfs: Fix oops on IO error during xlog_recover_process_iunlinks()
authorJan Kara <jack@suse.cz>
Thu, 15 Mar 2012 09:34:02 +0000 (09:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Apr 2012 17:32:21 +0000 (10:32 -0700)
commit1335e5befcbfab5419977f187c25917b7390a3e1
tree22c38070b67c5abf0eb11a722168f92438474cef
parent35409afc749a6fd9c45ced6349f7ddb20e67d1a0
xfs: Fix oops on IO error during xlog_recover_process_iunlinks()

commit d97d32edcd732110758799ae60af725e5110b3dc upstream.

When an IO error happens during inode deletion run from
xlog_recover_process_iunlinks() filesystem gets shutdown. Thus any subsequent
attempt to read buffers fails. Code in xlog_recover_process_iunlinks() does not
count with the fact that read of a buffer which was read a while ago can
really fail which results in the oops on
  agi = XFS_BUF_TO_AGI(agibp);

Fix the problem by cleaning up the buffer handling in
xlog_recover_process_iunlinks() as suggested by Dave Chinner. We release buffer
lock but keep buffer reference to AG buffer. That is enough for buffer to stay
pinned in memory and we don't have to call xfs_read_agi() all the time.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_log_recover.c