Re: -mm -> 2.6.13 merge status

From: Ross Biro
Date: Thu Jun 23 2005 - 15:15:55 EST

On 6/23/05, Olivier Galibert <galibert@xxxxxxxxx> wrote:

> No, I think he means the traditional:
> reiser4_fill_super()
> {
> if (init_a())
> goto failed_a;

IMO this works very well when the initialization always completes or
fails totally in a single routine. When your init routine can leave
something partially inited, then putting all of the cleanup code in a
single function and using the enums eliminates duplicate code and
makes things easier to read. (it's a state machine like many device
drivers and network stacks).

Also, perhaps a compromise on the asserts at the beggining of
functions. If they are moved into a header file, say
resier4_contracts.h and replaced with a single macro, you get most of
the benefits and elminate most of the clutter. If properly done,
there may even be some advantages gained by auto generating the
conttact.h file(s) from some sort of formal spec or design doc.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at