[HPDD-discuss] [PATCH] staging: lustre: llite: Use kzalloc and rewrite null tests

Julia Lawall julia.lawall at lip6.fr
Fri Sep 19 04:45:51 UTC 2014


With respect to the upper case lower case issue, does the thing need to be
a macro?  I think that the lowercase is more or less fine, but only if
what is behind it is a function.

I say more or less fine, because normally in the kernel the special
allocators have special purposes, eg allocating and initializing the xyz
structure.  Here what is wanted is a general purpose allocator with lots
of special tracing features, so it is not quite the same thing.  And one
can wonder why all of these special tracing features are not relevant to
the kernel as a whole?

In reading through the description of the needed features, it seems like
only the _ptr extension requires being a macro.  Do we need that?  The
rest of the kernel manages to do x = kzalloc(sizeof(*x),...) ok.  It's
unpleasant to have an assignment hidden in this way.  And currently it is
not used consistently.  There are some OBD_ALLOCs that have the same form.

Sorry for overlooking the frees.  I was focusing on trying one thing at a
time...

julia


More information about the devel mailing list