diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-25 10:40:14 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-25 10:40:14 -0400 |
commit | ff877ea80efa2015b6263766f78ee42c2a1b32f9 (patch) | |
tree | 85205005c611ab774702148558321c6fb92f1ccd /lib/textsearch.c | |
parent | 30821fee4f0cb3e6d241d9f7ddc37742212e3eb7 (diff) | |
parent | d37e6bf68fc1eb34a4ad21d9ae8890ed37ea80e7 (diff) |
Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6
Diffstat (limited to 'lib/textsearch.c')
-rw-r--r-- | lib/textsearch.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/textsearch.c b/lib/textsearch.c index be8bda3862f5..9fbcb44c554f 100644 --- a/lib/textsearch.c +++ b/lib/textsearch.c | |||
@@ -54,10 +54,13 @@ | |||
54 | * USAGE | 54 | * USAGE |
55 | * | 55 | * |
56 | * Before a search can be performed, a configuration must be created | 56 | * Before a search can be performed, a configuration must be created |
57 | * by calling textsearch_prepare() specyfing the searching algorithm and | 57 | * by calling textsearch_prepare() specifying the searching algorithm, |
58 | * the pattern to look for. The returned configuration may then be used | 58 | * the pattern to look for and flags. As a flag, you can set TS_IGNORECASE |
59 | * for an arbitary amount of times and even in parallel as long as a | 59 | * to perform case insensitive matching. But it might slow down |
60 | * separate struct ts_state variable is provided to every instance. | 60 | * performance of algorithm, so you should use it at own your risk. |
61 | * The returned configuration may then be used for an arbitary | ||
62 | * amount of times and even in parallel as long as a separate struct | ||
63 | * ts_state variable is provided to every instance. | ||
61 | * | 64 | * |
62 | * The actual search is performed by either calling textsearch_find_- | 65 | * The actual search is performed by either calling textsearch_find_- |
63 | * continuous() for linear data or by providing an own get_next_block() | 66 | * continuous() for linear data or by providing an own get_next_block() |
@@ -89,7 +92,6 @@ | |||
89 | * panic("Oh my god, dancing chickens at %d\n", pos); | 92 | * panic("Oh my god, dancing chickens at %d\n", pos); |
90 | * | 93 | * |
91 | * textsearch_destroy(conf); | 94 | * textsearch_destroy(conf); |
92 | * | ||
93 | * ========================================================================== | 95 | * ========================================================================== |
94 | */ | 96 | */ |
95 | 97 | ||
@@ -97,6 +99,7 @@ | |||
97 | #include <linux/types.h> | 99 | #include <linux/types.h> |
98 | #include <linux/string.h> | 100 | #include <linux/string.h> |
99 | #include <linux/init.h> | 101 | #include <linux/init.h> |
102 | #include <linux/rculist.h> | ||
100 | #include <linux/rcupdate.h> | 103 | #include <linux/rcupdate.h> |
101 | #include <linux/err.h> | 104 | #include <linux/err.h> |
102 | #include <linux/textsearch.h> | 105 | #include <linux/textsearch.h> |
@@ -264,7 +267,7 @@ struct ts_config *textsearch_prepare(const char *algo, const void *pattern, | |||
264 | return ERR_PTR(-EINVAL); | 267 | return ERR_PTR(-EINVAL); |
265 | 268 | ||
266 | ops = lookup_ts_algo(algo); | 269 | ops = lookup_ts_algo(algo); |
267 | #ifdef CONFIG_KMOD | 270 | #ifdef CONFIG_MODULES |
268 | /* | 271 | /* |
269 | * Why not always autoload you may ask. Some users are | 272 | * Why not always autoload you may ask. Some users are |
270 | * in a situation where requesting a module may deadlock, | 273 | * in a situation where requesting a module may deadlock, |
@@ -279,7 +282,7 @@ struct ts_config *textsearch_prepare(const char *algo, const void *pattern, | |||
279 | if (ops == NULL) | 282 | if (ops == NULL) |
280 | goto errout; | 283 | goto errout; |
281 | 284 | ||
282 | conf = ops->init(pattern, len, gfp_mask); | 285 | conf = ops->init(pattern, len, gfp_mask, flags); |
283 | if (IS_ERR(conf)) { | 286 | if (IS_ERR(conf)) { |
284 | err = PTR_ERR(conf); | 287 | err = PTR_ERR(conf); |
285 | goto errout; | 288 | goto errout; |