> > I believe that kern_mount() and kern_umount() are remnants from the time
> > when the binfmt_misc filesystem was mounted automatically by the kernel.
> > Removing them preserves all functionality (I did check it) while allows
> > unloading binfmt_misc if and only if the binfmt_misc filesystem is not
> > used for any mounts.
>
> That's wrong - you are using that tree to store information (entries
> you've defined), so the lifetime should be "there are mounts or there
> are entries". Which is actually pretty easy to implement - see if
> the following (completely untested) patch works for you. It should
> give the following rules:
> if you had defined some entries - they stay alive until you remove
> them, mounted or not (i.e. umount /proc/sys/binfmt_misc && mount ... will
> not destroy any state)
> if there is no entries and fs is not mounted - you can rmmod.
It works as you describe it. I agree that your approach is better.
-- Regards, Pavel Roskin- 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/