diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_app.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/net/ipv4/ipvs/ip_vs_app.c b/net/ipv4/ipvs/ip_vs_app.c index 664cb8e97c1c..535abe0c45e7 100644 --- a/net/ipv4/ipvs/ip_vs_app.c +++ b/net/ipv4/ipvs/ip_vs_app.c | |||
@@ -51,18 +51,13 @@ static DEFINE_MUTEX(__ip_vs_app_mutex); | |||
51 | */ | 51 | */ |
52 | static inline int ip_vs_app_get(struct ip_vs_app *app) | 52 | static inline int ip_vs_app_get(struct ip_vs_app *app) |
53 | { | 53 | { |
54 | /* test and get the module atomically */ | 54 | return try_module_get(app->module); |
55 | if (app->module) | ||
56 | return try_module_get(app->module); | ||
57 | else | ||
58 | return 1; | ||
59 | } | 55 | } |
60 | 56 | ||
61 | 57 | ||
62 | static inline void ip_vs_app_put(struct ip_vs_app *app) | 58 | static inline void ip_vs_app_put(struct ip_vs_app *app) |
63 | { | 59 | { |
64 | if (app->module) | 60 | module_put(app->module); |
65 | module_put(app->module); | ||
66 | } | 61 | } |
67 | 62 | ||
68 | 63 | ||