]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: Morph the haphazard OCFS2_IS_VALID_DINODE() checks.
authorJoel Becker <joel.becker@oracle.com>
Thu, 13 Nov 2008 22:49:12 +0000 (14:49 -0800)
committerMark Fasheh <mfasheh@suse.com>
Mon, 5 Jan 2009 16:36:52 +0000 (08:36 -0800)
commit701651cb89f4550760ae91f4ac1dc24f69ab90d6
tree63129e7d752fb018dc76aa42de136baa4a8a4232
parent78b9803cf8ff1aeb60798bdbf686e2481679a72d
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>
fs/ocfs2/alloc.c
fs/ocfs2/journal.c
fs/ocfs2/ocfs2.h
fs/ocfs2/resize.c
fs/ocfs2/suballoc.c