projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mm/memory.c: fix race when faulting a device private page
[linux-2.6-block.git]
/
lib
/
lru_cache.c
diff --git
a/lib/lru_cache.c
b/lib/lru_cache.c
index 52313acbfa6284a57909ec8967e1abac0a24259b..dc35464216d3ccb0340ba747e5c3ef64620b51a4 100644
(file)
--- a/
lib/lru_cache.c
+++ b/
lib/lru_cache.c
@@
-147,8
+147,8
@@
struct lru_cache *lc_create(const char *name, struct kmem_cache *cache,
return lc;
/* else: could not allocate all elements, give up */
-
for (i--; i; i--
) {
- void *p = element[i];
+
while (i
) {
+ void *p = element[
--
i];
kmem_cache_free(cache, p - e_off);
}
kfree(lc);