--- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -1457,6 +1457,7 @@ void gfs2_quota_cleanup(struct gfs2_sbd *sdp) struct gfs2_quota_data *qd; spin_lock(&qd_lock); + mutex_lock(&sdp->sd_quota_sync_mutex); while (!list_empty(head)) { qd = list_last_entry(head, struct gfs2_quota_data, qd_list); @@ -1480,6 +1481,7 @@ void gfs2_quota_cleanup(struct gfs2_sbd *sdp) spin_lock(&qd_lock); } + mutex_unlock(&sdp->sd_quota_sync_mutex); spin_unlock(&qd_lock); gfs2_assert_warn(sdp, !atomic_read(&sdp->sd_quota_count));