I really would tend to prefer that.
We had a very similar situation in the ACPI/WMI code, where some WMI
helper routines would crash just because the WMI data structures hadn't
been initialized.
The proper fix in that case (in my opinion, and the one that thus got
committed ;^) was simply to make sure that the data structures were simply
always consistent (and empty), even if the code itself was disabled. That
just automatically meant that it didn't need any global flags to be
tested.
So _if_ the alternative is as simple as just making sure that smackfs
keeps its data structures consistent even when disabled, I think that's
the right patch, rather than adding a separate hack to not touch them.
Linus
--