diff options
author | Denis Cheng <crquan@gmail.com> | 2007-12-05 02:45:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-05 12:21:18 -0500 |
commit | 4b01a0b1613beeb01e12c78feb69e98f0da0a69a (patch) | |
tree | d92ae6d43c8f3b18c8ae785dc322ad9e2e3fae36 /mm | |
parent | 0c664f974269bb4c3d38ba900c91a9a5d4cee5b1 (diff) |
mm/backing-dev.c: fix percpu_counter_destroy call bug in bdi_init
this call should use the array index j, not i. But with this approach, just
one int i is enough, int j is not needed.
Signed-off-by: Denis Cheng <crquan@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/backing-dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index b0ceb29da4c..e8644b1e552 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | int bdi_init(struct backing_dev_info *bdi) | 8 | int bdi_init(struct backing_dev_info *bdi) |
9 | { | 9 | { |
10 | int i, j; | 10 | int i; |
11 | int err; | 11 | int err; |
12 | 12 | ||
13 | for (i = 0; i < NR_BDI_STAT_ITEMS; i++) { | 13 | for (i = 0; i < NR_BDI_STAT_ITEMS; i++) { |
@@ -21,7 +21,7 @@ int bdi_init(struct backing_dev_info *bdi) | |||
21 | 21 | ||
22 | if (err) { | 22 | if (err) { |
23 | err: | 23 | err: |
24 | for (j = 0; j < i; j++) | 24 | while (i--) |
25 | percpu_counter_destroy(&bdi->bdi_stat[i]); | 25 | percpu_counter_destroy(&bdi->bdi_stat[i]); |
26 | } | 26 | } |
27 | 27 | ||