diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-04-08 22:35:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-09 10:49:44 -0400 |
commit | 97c18e2c7a8e36d2d83d50ee070314aadac73a11 (patch) | |
tree | fbccf33515ae3bb835e90af11da18614abde847e | |
parent | f4efdd65b754ebbf41484d3a2255c59282720650 (diff) |
module: try_then_request_module must wait
Since the whole point of try_then_request_module is to retry
the operation after a module has been loaded, we must wait for
the module to fully load.
Otherwise all sort of things start breaking, e.g., you won't
be able to read your encrypted disks on the first attempt.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com>
Tested-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/kmod.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index d5fa565086d1..384ca8bbf1ac 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -34,7 +34,7 @@ extern int __request_module(bool wait, const char *name, ...) \ | |||
34 | #define request_module(mod...) __request_module(true, mod) | 34 | #define request_module(mod...) __request_module(true, mod) |
35 | #define request_module_nowait(mod...) __request_module(false, mod) | 35 | #define request_module_nowait(mod...) __request_module(false, mod) |
36 | #define try_then_request_module(x, mod...) \ | 36 | #define try_then_request_module(x, mod...) \ |
37 | ((x) ?: (__request_module(false, mod), (x))) | 37 | ((x) ?: (__request_module(true, mod), (x))) |
38 | #else | 38 | #else |
39 | static inline int request_module(const char *name, ...) { return -ENOSYS; } | 39 | static inline int request_module(const char *name, ...) { return -ENOSYS; } |
40 | static inline int request_module_nowait(const char *name, ...) { return -ENOSYS; } | 40 | static inline int request_module_nowait(const char *name, ...) { return -ENOSYS; } |