Skip to content

Commit

Permalink
[XFS] Catch errors from xfs_imap().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Chinner authored and Lachlan McIlroy committed Apr 18, 2008
1 parent 7b07339 commit 64bfe1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/xfs/xfs_log_recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit 64bfe1b

Please sign in to comment.