aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu <[email protected]>2009-04-09 10:35:47 +0800
committerLinus Torvalds <[email protected]>2009-04-09 07:49:44 -0700
commit97c18e2c7a8e36d2d83d50ee070314aadac73a11 (patch)
treefbccf33515ae3bb835e90af11da18614abde847e
parentf4efdd65b754ebbf41484d3a2255c59282720650 (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 <[email protected]> Tested-by: Maciej Rutecki <[email protected]> Tested-by: Patrick McHardy <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--include/linux/kmod.h2
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, ...) \
#define request_module(mod...) __request_module(true, mod)
#define request_module_nowait(mod...) __request_module(false, mod)
#define try_then_request_module(x, mod...) \
- ((x) ?: (__request_module(false, mod), (x)))
+ ((x) ?: (__request_module(true, mod), (x)))
#else
static inline int request_module(const char *name, ...) { return -ENOSYS; }
static inline int request_module_nowait(const char *name, ...) { return -ENOSYS; }