Re: [Ext2-devel] [RFC] [PATCH] Clean up fs.h union for ext2

Oliver Xymoron
2001-12-29T21:30:39Z

On Sat, 29 Dec 2001, Andreas Dilger wrote:

> > The ext3 macros are rather revolting, simply because they assume the
> > variable name. A parameterized macro might be the best compromise:
> >
> > #define EXT2_I(i) (&(i->u.ext2_inode_info))
>
> My mistake, the Ext3 macros _do_ take an inode/sb parameter. It's not that
> I'm a huge fan of macros over inline functions, it's just that I would like
> to have a consensus about how it should be done so that it is consistent
> between ext2 and ext3.

The inline route is the way to go. The const guarantee on *inode doesn't
get propagated down to the objects it points to by the compiler anyway so
when the unions go away being const-correct gains us nothing.

--
"Love the dolphins," she advised him. "Write by W.A.S.T.E.."