]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: Wrap group descriptor reads in a dedicated function.
authorJoel Becker <joel.becker@oracle.com>
Thu, 13 Nov 2008 22:49:14 +0000 (14:49 -0800)
committerMark Fasheh <mfasheh@suse.com>
Mon, 5 Jan 2009 16:36:53 +0000 (08:36 -0800)
commitb14b71a911ca37c44bfd836682a007bdd52bae18
treeb94f14b3a8b093dc52f2b034e7666b14c536f0d6
parent9077d98e12b32e796e9f8bda5dfd9bab13e6c6cd
ocfs2: Wrap group descriptor reads in a dedicated function.

We have a clean call for validating group descriptors, but every place
that wants the always does a read_block()+validate() call pair.  Create
a toplevel ocfs2_read_group_descriptor() that does the right
thing.  This allows us to leverage the single call point later for
fancier handling.  We also add validation of gd->bg_generation against
the superblock and gd->bg_blkno against the block we thought we read.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
fs/ocfs2/resize.c
fs/ocfs2/suballoc.c
fs/ocfs2/suballoc.h