diff options
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r-- | fs/gfs2/super.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 2e74792ee487..22e09660d648 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | 2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
3 | * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. | 3 | * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. |
4 | * | 4 | * |
5 | * This copyrighted material is made available to anyone wishing to use, | 5 | * This copyrighted material is made available to anyone wishing to use, |
6 | * modify, copy, or redistribute it subject to the terms and conditions | 6 | * modify, copy, or redistribute it subject to the terms and conditions |
@@ -416,8 +416,9 @@ int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh) | |||
416 | 416 | ||
417 | void gfs2_jindex_free(struct gfs2_sbd *sdp) | 417 | void gfs2_jindex_free(struct gfs2_sbd *sdp) |
418 | { | 418 | { |
419 | struct list_head list; | 419 | struct list_head list, *head; |
420 | struct gfs2_jdesc *jd; | 420 | struct gfs2_jdesc *jd; |
421 | struct gfs2_journal_extent *jext; | ||
421 | 422 | ||
422 | spin_lock(&sdp->sd_jindex_spin); | 423 | spin_lock(&sdp->sd_jindex_spin); |
423 | list_add(&list, &sdp->sd_jindex_list); | 424 | list_add(&list, &sdp->sd_jindex_list); |
@@ -427,6 +428,14 @@ void gfs2_jindex_free(struct gfs2_sbd *sdp) | |||
427 | 428 | ||
428 | while (!list_empty(&list)) { | 429 | while (!list_empty(&list)) { |
429 | jd = list_entry(list.next, struct gfs2_jdesc, jd_list); | 430 | jd = list_entry(list.next, struct gfs2_jdesc, jd_list); |
431 | head = &jd->extent_list; | ||
432 | while (!list_empty(head)) { | ||
433 | jext = list_entry(head->next, | ||
434 | struct gfs2_journal_extent, | ||
435 | extent_list); | ||
436 | list_del(&jext->extent_list); | ||
437 | kfree(jext); | ||
438 | } | ||
430 | list_del(&jd->jd_list); | 439 | list_del(&jd->jd_list); |
431 | iput(jd->jd_inode); | 440 | iput(jd->jd_inode); |
432 | kfree(jd); | 441 | kfree(jd); |