diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 33ca04733e93..9c62d33dd7d9 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -66,6 +66,7 @@ void free_sbd(struct gfs2_sbd *sdp) { if (sdp->sd_lkstats) free_percpu(sdp->sd_lkstats); + printk("%s, %p \n", __func__, sdp); kfree(sdp); } diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 171b2713d2e5..9746b5a6d81b 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -112,6 +112,7 @@ static void gfs2_qd_dealloc(struct rcu_head *rcu) struct gfs2_sbd *sdp = qd->qd_sbd; kmem_cache_free(gfs2_quotad_cachep, qd); + printk("%p, %p, %s\n", qd, sdp, __func__); if (atomic_dec_and_test(&sdp->sd_quota_count)) wake_up(&sdp->sd_kill_wait); } @@ -135,12 +136,14 @@ static void gfs2_qd_dispose(struct gfs2_quota_data *qd) } gfs2_glock_put(qd->qd_gl); + printk("%p, %p, %s\n", qd, sdp, __func__); call_rcu(&qd->qd_rcu, gfs2_qd_dealloc); } static void gfs2_qd_list_dispose(struct list_head *list) { struct gfs2_quota_data *qd; + printk("%p, %s\n", qd, __func__); while (!list_empty(list)) { qd = list_first_entry(list, struct gfs2_quota_data, qd_lru); @@ -184,6 +187,7 @@ static unsigned long gfs2_qd_shrink_scan(struct shrinker *shrink, freed = list_lru_shrink_walk(&gfs2_qd_lru, sc, gfs2_qd_isolate, &dispose); + printk(" %s\n", __func__); gfs2_qd_list_dispose(&dispose); @@ -326,6 +330,7 @@ static void qd_put(struct gfs2_quota_data *qd) lockref_mark_dead(&qd->qd_lockref); spin_unlock(&qd->qd_lockref.lock); + printk("%p, %p, %s\n", qd, sdp, __func__); gfs2_qd_dispose(qd); return; } @@ -1501,10 +1506,11 @@ void gfs2_quota_cleanup(struct gfs2_sbd *sdp) gfs2_qd_list_dispose(&dispose); - wait_event_timeout(sdp->sd_kill_wait, - (count = atomic_read(&sdp->sd_quota_count)) == 0, - HZ * 60); + printk("1, %s\n", __func__); + wait_event(sdp->sd_kill_wait, + (count = atomic_read(&sdp->sd_quota_count)) == 0); + printk("2, %s, %d\n", __func__, count); if (count != 0) fs_err(sdp, "%d left-over quota data objects\n", count); diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 02d93da21b2b..59494dbe2c4a 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -585,6 +585,7 @@ static void gfs2_put_super(struct super_block *sb) struct gfs2_sbd *sdp = sb->s_fs_info; struct gfs2_jdesc *jd; + printk("0, %s, %p\n", __func__, sdp); /* No more recovery requests */ set_bit(SDF_NORECOVERY, &sdp->sd_flags); smp_mb(); @@ -603,9 +604,11 @@ static void gfs2_put_super(struct super_block *sb) spin_unlock(&sdp->sd_jindex_spin); if (!sb_rdonly(sb)) { + printk("1, %s, %p\n", __func__, sdp); gfs2_make_fs_ro(sdp); } if (gfs2_withdrawn(sdp)) { + printk("2, %s, %p\n", __func__, sdp); gfs2_destroy_threads(sdp); gfs2_quota_cleanup(sdp); } @@ -649,6 +652,7 @@ static void gfs2_put_super(struct super_block *sb) /* At this point, we're through participating in the lockspace */ gfs2_sys_fs_del(sdp); + printk("3, %s, %p\n", __func__, sdp); free_sbd(sdp); }