Agreed... the more type checking you can provide, the better.
Note that if it is possible to avoid the union in a manner that follows
the VFS inode cleanup, feel free to that too... Basically each private
info struct looks like
struct foo_inode {
/* ... driver-private stuff here ... */
struct inode vfs_inode; /* last member of struct */
};
Making it the last member of the structure ensures that people are not
tempted to do gross typecasting based on assumptions that the
"superclass" type is always located at the beginning of the subclass
substructure. (I don't know how well that applies to this case, just a
suggestion...)
Jeff
-- Jeff Garzik | "Why is it that attractive girls like you Building 1024 | always seem to have a boyfriend?" MandrakeSoft | "Because I'm a nympho that owns a brewery?" | - BBC TV show "Coupling" - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/