diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-11-13 14:49:12 -0800 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-01-05 08:36:52 -0800 |
commit | 10995aa2451afa20b721cc7de856cae1a13dba57 (patch) | |
tree | 63129e7d752fb018dc76aa42de136baa4a8a4232 /fs/ocfs2/ocfs2.h | |
parent | b657c95c11088d77fc1bfc9c84d940f778bf9d12 (diff) | |
download | op-kernel-dev-10995aa2451afa20b721cc7de856cae1a13dba57.zip op-kernel-dev-10995aa2451afa20b721cc7de856cae1a13dba57.tar.gz |
ocfs2: Morph the haphazard OCFS2_IS_VALID_DINODE() checks.
Random places in the code would check a dinode bh to see if it was
valid. Not only did they do different levels of validation, they
handled errors in different ways.
The previous commit unified inode block reads, validating all block
reads in the same place. Thus, these haphazard 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 inode 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 | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index 25d07ff..467bdb6 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h @@ -444,14 +444,6 @@ static inline int ocfs2_uses_extended_slot_map(struct ocfs2_super *osb) #define OCFS2_IS_VALID_DINODE(ptr) \ (!strcmp((ptr)->i_signature, OCFS2_INODE_SIGNATURE)) -#define OCFS2_RO_ON_INVALID_DINODE(__sb, __di) do { \ - typeof(__di) ____di = (__di); \ - ocfs2_error((__sb), \ - "Dinode # %llu has bad signature %.*s", \ - (unsigned long long)le64_to_cpu((____di)->i_blkno), 7, \ - (____di)->i_signature); \ -} while (0) - #define OCFS2_IS_VALID_EXTENT_BLOCK(ptr) \ (!strcmp((ptr)->h_signature, OCFS2_EXTENT_BLOCK_SIGNATURE)) |