Right.
> And even when struct inode is not a strict power of 2 (which it
> typically isn't) gcc still does a decent job since most of the
> operations are constant and get optimized away. Gcc in this case,
> has a very good idea what you are trying to do ;-)
Note that even when the size is not a strict power of two, the sequence
will find the largest power of two that the size is divisible by - which
tends to be just the size of an "unsigned long", but instead of just using
that directly the above at least has a small chance of finding a larger
power of two if one were to be available.
Whether the calculation helps I can't really say, but it may help, and it
certainly cannot make matters worse.
Linus