--- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -1459,6 +1459,10 @@ void gfs2_quota_cleanup(struct gfs2_sbd *sdp) spin_lock(&qd_lock); while (!list_empty(head)) { qd = list_last_entry(head, struct gfs2_quota_data, qd_list); + if (qd->qd_lockref.count > 0) { + spin_unlock(&qd_lock); + return; + } list_del(&qd->qd_list);