diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2012-02-23 16:37:13 -0200 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2012-02-23 16:47:33 -0200 |
commit | 7cd664fbaead46b5f5ea4812cf9a7cbe6264eb7d (patch) | |
tree | a84ef2c68c9ca0625cec4174d2cec729dc9c83ce /libkmod/libkmod-module.c | |
parent | 80e54cb675d08f4f81b093a1919465ea86110a3b (diff) | |
download | kmod-7cd664fbaead46b5f5ea4812cf9a7cbe6264eb7d.tar.gz kmod-7cd664fbaead46b5f5ea4812cf9a7cbe6264eb7d.tar.bz2 kmod-7cd664fbaead46b5f5ea4812cf9a7cbe6264eb7d.zip |
libkmod-module: don't treat "coming" as in-kernel
Running two instances of modprobe with the same module should both
succeed or both fail:
modprobe foo&; modprobe foo;
Previously if foo failed to be inserted by the first call, the second one
could return 0 because it may have occurred while the first one was being
processed by kernel (thus marked as "coming").
Now we simply don't check by "coming" in order to decide if we need to
call init_module(). module-init-tools used to spin calling
usleep(100000), but calls to init_module() are already synchronous.
Therefore let kernel synchronize the calls.
Diffstat (limited to 'libkmod/libkmod-module.c')
-rw-r--r-- | libkmod/libkmod-module.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c index 69f1265..de25281 100644 --- a/libkmod/libkmod-module.c +++ b/libkmod/libkmod-module.c @@ -110,7 +110,6 @@ static inline bool module_is_inkernel(struct kmod_module *mod) int state = kmod_module_get_initstate(mod); if (state == KMOD_MODULE_LIVE || - state == KMOD_MODULE_COMING || state == KMOD_MODULE_BUILTIN) return true; |