-#if 0
-int gfs2_quota_read(struct gfs2_sbd *sdp, int user, u32 id,
- struct gfs2_quota *q)
-{
- struct gfs2_quota_data *qd;
- struct gfs2_holder q_gh;
- int error;
-
- if (((user) ? (id != current->fsuid) : (!in_group_p(id))) &&
- !capable(CAP_SYS_ADMIN))
- return -EACCES;
-
- error = qd_get(sdp, user, id, CREATE, &qd);
- if (error)
- return error;
-
- error = do_glock(qd, NO_FORCE, &q_gh);
- if (error)
- goto out;
-
- memset(q, 0, sizeof(struct gfs2_quota));
- q->qu_limit = be64_to_cpu(qd->qd_qb.qb_limit);
- q->qu_warn = be64_to_cpu(qd->qd_qb.qb_warn);
- q->qu_value = be64_to_cpu(qd->qd_qb.qb_value);
-
- spin_lock(&sdp->sd_quota_spin);
- q->qu_value += qd->qd_change;
- spin_unlock(&sdp->sd_quota_spin);
-
- gfs2_glock_dq_uninit(&q_gh);
-
-out:
- qd_put(qd);
- return error;
-}
-#endif /* 0 */
-