From: David Chinner Date: Thu, 10 Apr 2008 02:24:10 +0000 (+1000) Subject: [XFS] Catch errors from xfs_imap(). X-Git-Tag: v2.6.26-rc1~1147^2~16 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=64bfe1bfae833e89ed77f72c61ded19f4b1976f8;p=linux-2.6-omap-h63xx.git [XFS] Catch errors from xfs_imap(). Catch errors from xfs_imap() in log recovery when we might be trying to map an invalid inode number due to a corrupted log. SGI-PV: 980084 SGI-Modid: xfs-linux-melb:xfs-kern:30829a Signed-off-by: David Chinner Signed-off-by: Niv Sardi Signed-off-by: Lachlan McIlroy --- diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 1f83298f90a..a8039431b86 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -2282,7 +2282,9 @@ xlog_recover_do_inode_trans( * invalidate the buffer when we write it out below. */ imap.im_blkno = 0; - xfs_imap(log->l_mp, NULL, ino, &imap, 0); + error = xfs_imap(log->l_mp, NULL, ino, &imap, 0); + if (error) + goto error; } /*