diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-11-13 17:49:15 -0500 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-01-05 11:36:53 -0500 |
commit | 4203530613280281868b3ca36c817530bca3825c (patch) | |
tree | 57acc14e07bd97491a3781eb61e8c83c3c6e0151 /fs/ocfs2/ocfs2.h | |
parent | 68f64d471be38631d7196b938d9809802dd467fa (diff) |
ocfs2: Morph the haphazard OCFS2_IS_VALID_GROUP_DESC() checks.
Random places in the code would check a group descriptor bh to see if it
was valid. The previous commit unified descriptor block reads,
validating all block reads in the same place. Thus, these checks are no
longer necessary. Rather than eliminate them, however, we change them
to BUG_ON() checks. This ensures the assumptions remain true. All of
the code paths to these checks have been audited to ensure they come
from a validated descriptor read.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/ocfs2.h')
-rw-r--r-- | fs/ocfs2/ocfs2.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index 467bdb6f71e1..82ba887afa0d 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h | |||
@@ -458,13 +458,6 @@ static inline int ocfs2_uses_extended_slot_map(struct ocfs2_super *osb) | |||
458 | #define OCFS2_IS_VALID_GROUP_DESC(ptr) \ | 458 | #define OCFS2_IS_VALID_GROUP_DESC(ptr) \ |
459 | (!strcmp((ptr)->bg_signature, OCFS2_GROUP_DESC_SIGNATURE)) | 459 | (!strcmp((ptr)->bg_signature, OCFS2_GROUP_DESC_SIGNATURE)) |
460 | 460 | ||
461 | #define OCFS2_RO_ON_INVALID_GROUP_DESC(__sb, __gd) do { \ | ||
462 | typeof(__gd) ____gd = (__gd); \ | ||
463 | ocfs2_error((__sb), \ | ||
464 | "Group Descriptor # %llu has bad signature %.*s", \ | ||
465 | (unsigned long long)le64_to_cpu((____gd)->bg_blkno), 7, \ | ||
466 | (____gd)->bg_signature); \ | ||
467 | } while (0) | ||
468 | 461 | ||
469 | #define OCFS2_IS_VALID_XATTR_BLOCK(ptr) \ | 462 | #define OCFS2_IS_VALID_XATTR_BLOCK(ptr) \ |
470 | (!strcmp((ptr)->xb_signature, OCFS2_XATTR_BLOCK_SIGNATURE)) | 463 | (!strcmp((ptr)->xb_signature, OCFS2_XATTR_BLOCK_SIGNATURE)) |