On Sat 16-09-17 02:27:05, weiping zhang wrote: > when percpu_counter_init fail at i, 0 ~ (i-1) should be destoried, not > 1 ~ i. > > Signed-off-by: weiping zhang <zhangweiping@xxxxxxxxxxxxxxx> Good catch. You can add: Reviewed-by: Jan Kara <jack@xxxxxxx> Honza > --- > mm/backing-dev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/backing-dev.c b/mm/backing-dev.c > index e19606b..d399d3c 100644 > --- a/mm/backing-dev.c > +++ b/mm/backing-dev.c > @@ -334,7 +334,7 @@ static int wb_init(struct bdi_writeback *wb, struct backing_dev_info *bdi, > return 0; > > out_destroy_stat: > - while (i--) > + while (--i >= 0) > percpu_counter_destroy(&wb->stat[i]); > fprop_local_destroy_percpu(&wb->completions); > out_put_cong: > -- > 2.9.4 > -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>