Lines Matching refs:dquot
55 static int v1_read_dqblk(struct dquot *dquot)
57 int type = dquot->dq_type;
60 if (!sb_dqopt(dquot->dq_sb)->files[type])
65 dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type, (char *)&dqblk,
66 sizeof(struct v1_disk_dqblk), v1_dqoff(dquot->dq_id));
68 v1_disk2mem_dqblk(&dquot->dq_dqb, &dqblk);
69 if (dquot->dq_dqb.dqb_bhardlimit == 0 &&
70 dquot->dq_dqb.dqb_bsoftlimit == 0 &&
71 dquot->dq_dqb.dqb_ihardlimit == 0 &&
72 dquot->dq_dqb.dqb_isoftlimit == 0)
73 set_bit(DQ_FAKE_B, &dquot->dq_flags);
79 static int v1_commit_dqblk(struct dquot *dquot)
81 short type = dquot->dq_type;
85 v1_mem2disk_dqblk(&dqblk, &dquot->dq_dqb);
86 if (dquot->dq_id == 0) {
88 sb_dqopt(dquot->dq_sb)->info[type].dqi_bgrace;
90 sb_dqopt(dquot->dq_sb)->info[type].dqi_igrace;
93 if (sb_dqopt(dquot->dq_sb)->files[type])
94 ret = dquot->dq_sb->s_op->quota_write(dquot->dq_sb, type,
96 v1_dqoff(dquot->dq_id));
98 quota_error(dquot->dq_sb, "dquota write failed");