diff options
| author | Stephen Rothwell <sfr@canb.auug.org.au> | 2022-06-28 16:54:05 +1000 |
|---|---|---|
| committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2022-06-28 16:54:05 +1000 |
| commit | 5f9df76887bf8170e8844f1907c13fbbb30e9c36 (patch) | |
| tree | 3b940f7e1c36605af69ffe3a3e9bc8fa53bd12a1 /lib/lru_cache.c | |
| parent | 8f850ad6cf932b8b5125f9585cb397e08403cccd (diff) | |
| parent | 84b494dcbcc015419e629ced664d3b737e83336e (diff) | |
| download | linux-next-akpm.tar.gz linux-next-akpm.zip | |
# Conflicts:
# include/linux/pagevec.h
Diffstat (limited to 'lib/lru_cache.c')
| -rw-r--r-- | lib/lru_cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lru_cache.c b/lib/lru_cache.c index 52313acbfa62..dc35464216d3 100644 --- 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); |
