[Ocfs2-devel] [PATCH]remove ocfs_fill_super and port ocfs_read_super

Joel Becker Joel.Becker at oracle.com
Fri Mar 26 06:34:54 CST 2004


On Thu, Mar 25, 2004 at 06:59:49PM -0800, Rusty Lynch wrote:
> The 2.6 version of ocfs_read_super (known as ocfs_fill_super) had
> a bug where it wasn't unmounting on error.  There really isn't a lot
> different between the 2.4 and 2.5 functions, so here is a patch that
> adds 2.6 support to the existing ocfs_read_super, and nukes the old
> ocfs_fill_super.

	Ugh ugh ugh.  I see what you are trying to do here, but you are
peppering one function with multiple #ifdefs.  Better to make the guts
be an #ifdef ocfs_generic_fill_super(), with:

#if KERNEL_VERSION < LINUX_VERSION_CODE(2,6,0)
static int ocfs_read_super(...)
{
    /* 2.6 specific */
    ocfs_generic_fill_super();
    /* 2.6 specific */
}
#else
static struct super_block *ocfs_read_super(...)
{
    /* 2.4 specific */
    ocfs_generic_fill_super();
    /* 2.4 specific */
}
#endif

Joel

-- 

"Under capitalism, man exploits man.  Under Communism, it's just 
   the opposite."
				 - John Kenneth Galbraith

Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127


More information about the Ocfs2-devel mailing list