diff options
Diffstat (limited to 'fs')
-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 82d46ce69d5f..70e3ba32e6be 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -1419,7 +1419,13 @@ xlog_recover_add_to_trans( | |||
1419 | return 0; | 1419 | return 0; |
1420 | item = trans->r_itemq; | 1420 | item = trans->r_itemq; |
1421 | if (item == NULL) { | 1421 | if (item == NULL) { |
1422 | ASSERT(*(uint *)dp == XFS_TRANS_HEADER_MAGIC); | 1422 | /* we need to catch log corruptions here */ |
1423 | if (*(uint *)dp != XFS_TRANS_HEADER_MAGIC) { | ||
1424 | xlog_warn("XFS: xlog_recover_add_to_trans: " | ||
1425 | "bad header magic number"); | ||
1426 | ASSERT(0); | ||
1427 | return XFS_ERROR(EIO); | ||
1428 | } | ||
1423 | if (len == sizeof(xfs_trans_header_t)) | 1429 | if (len == sizeof(xfs_trans_header_t)) |
1424 | xlog_recover_add_item(&trans->r_itemq); | 1430 | xlog_recover_add_item(&trans->r_itemq); |
1425 | memcpy(&trans->r_theader, dp, len); /* d, s, l */ | 1431 | memcpy(&trans->r_theader, dp, len); /* d, s, l */ |