]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[XFS] Catch errors from xfs_imap().
authorDavid Chinner <dgc@sgi.com>
Thu, 10 Apr 2008 02:24:10 +0000 (12:24 +1000)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Fri, 18 Apr 2008 02:01:39 +0000 (12:01 +1000)
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 <dgc@sgi.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
fs/xfs/xfs_log_recover.c

index 1f83298f90aaec6c9ab42549df3d881a80b7798d..a8039431b86f1a80d0b4d1d919ab5668fa394d75 100644 (file)
@@ -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;
        }
 
        /*