aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_log_recover.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-11-17 10:46:18 +0100
committerIngo Molnar <mingo@elte.hu>2008-11-17 10:46:18 +0100
commit9dacc71ff31a008d1e689fc824d31f6696454f68 (patch)
treeb792f9c30008e1ed469a73ead4339fdf8a50a5ce /fs/xfs/xfs_log_recover.c
parent19f47c634ea8c5a10ff7bb1a08c52fd0f49bc54c (diff)
parent9bf1a2445f3c569098b8de7097ca324e65abecc2 (diff)
Merge commit 'v2.6.28-rc5' into x86/cleanups
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r--fs/xfs/xfs_log_recover.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 82d46ce69d5..70e3ba32e6b 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -1419,7 +1419,13 @@ xlog_recover_add_to_trans(
return 0;
item = trans->r_itemq;
if (item == NULL) {
- ASSERT(*(uint *)dp == XFS_TRANS_HEADER_MAGIC);
+ /* we need to catch log corruptions here */
+ if (*(uint *)dp != XFS_TRANS_HEADER_MAGIC) {
+ xlog_warn("XFS: xlog_recover_add_to_trans: "
+ "bad header magic number");
+ ASSERT(0);
+ return XFS_ERROR(EIO);
+ }
if (len == sizeof(xfs_trans_header_t))
xlog_recover_add_item(&trans->r_itemq);
memcpy(&trans->r_theader, dp, len); /* d, s, l */