diff options
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index cff901efc24b..b411d4947318 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -1417,7 +1417,13 @@ xlog_recover_add_to_trans( | |||
1417 | return 0; | 1417 | return 0; |
1418 | item = trans->r_itemq; | 1418 | item = trans->r_itemq; |
1419 | if (item == NULL) { | 1419 | if (item == NULL) { |
1420 | ASSERT(*(uint *)dp == XFS_TRANS_HEADER_MAGIC); | 1420 | /* we need to catch log corruptions here */ |
1421 | if (*(uint *)dp != XFS_TRANS_HEADER_MAGIC) { | ||
1422 | xlog_warn("XFS: xlog_recover_add_to_trans: " | ||
1423 | "bad header magic number"); | ||
1424 | ASSERT(0); | ||
1425 | return XFS_ERROR(EIO); | ||
1426 | } | ||
1421 | if (len == sizeof(xfs_trans_header_t)) | 1427 | if (len == sizeof(xfs_trans_header_t)) |
1422 | xlog_recover_add_item(&trans->r_itemq); | 1428 | xlog_recover_add_item(&trans->r_itemq); |
1423 | memcpy(&trans->r_theader, dp, len); /* d, s, l */ | 1429 | memcpy(&trans->r_theader, dp, len); /* d, s, l */ |