Files
android_kernel_xiaomi_sm8450/fs/ocfs2
Joel Becker b657c95c11 ocfs2: Wrap inode block reads in a dedicated function.
The ocfs2 code currently reads inodes off disk with a simple
ocfs2_read_block() call.  Each place that does this has a different set
of sanity checks it performs.  Some check only the signature.  A couple
validate the block number (the block read vs di->i_blkno).  A couple
others check for VALID_FL.  Only one place validates i_fs_generation.  A
couple check nothing.  Even when an error is found, they don't all do
the same thing.

We wrap inode reading into ocfs2_read_inode_block().  This will validate
all the above fields, going readonly if they are invalid (they never
should be).  ocfs2_read_inode_block_full() is provided for the places
that want to pass read_block flags.  Every caller is passing a struct
inode with a valid ip_blkno, so we don't need a separate blkno argument
either.

We will remove the validation checks from the rest of the code in a
later commit, as they are no longer necessary.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2009-01-05 08:36:52 -08:00
..
2008-10-31 00:56:28 -07:00
2008-12-04 17:16:36 +11:00
2009-01-05 08:34:20 -08:00
2009-01-05 08:34:20 -08:00
2007-10-16 09:42:58 -07:00
2008-01-25 14:45:34 -08:00
2007-10-12 11:54:38 -07:00
2008-10-13 17:02:43 -07:00
2008-10-13 13:57:57 -07:00
2008-10-13 13:57:57 -07:00
2009-01-05 08:34:20 -08:00
2008-02-03 17:33:42 +02:00
2008-12-16 18:26:16 -08:00
2008-10-13 17:02:43 -07:00
2009-01-05 08:34:20 -08:00
2008-10-14 11:51:57 -07:00
2008-10-13 17:02:44 -07:00
2008-10-13 13:57:57 -07:00
2008-10-14 11:51:57 -07:00
2008-01-25 15:05:46 -08:00
2009-01-05 08:34:20 -08:00
2009-01-05 08:34:20 -08:00