Lines Matching refs:dquot
40 static int v1_read_dqblk(struct dquot *dquot)
42 int type = dquot->dq_type;
45 if (!sb_dqopt(dquot->dq_sb)->files[type])
50 dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type, (char *)&dqblk, sizeof(struct v1_disk_dqblk), v1_dqoff(dquot->dq_id));
52 v1_disk2mem_dqblk(&dquot->dq_dqb, &dqblk);
53 if (dquot->dq_dqb.dqb_bhardlimit == 0 && dquot->dq_dqb.dqb_bsoftlimit == 0 &&
54 dquot->dq_dqb.dqb_ihardlimit == 0 && dquot->dq_dqb.dqb_isoftlimit == 0)
55 set_bit(DQ_FAKE_B, &dquot->dq_flags);
61 static int v1_commit_dqblk(struct dquot *dquot)
63 short type = dquot->dq_type;
67 v1_mem2disk_dqblk(&dqblk, &dquot->dq_dqb);
68 if (dquot->dq_id == 0) {
69 dqblk.dqb_btime = sb_dqopt(dquot->dq_sb)->info[type].dqi_bgrace;
70 dqblk.dqb_itime = sb_dqopt(dquot->dq_sb)->info[type].dqi_igrace;
73 if (sb_dqopt(dquot->dq_sb)->files[type])
74 ret = dquot->dq_sb->s_op->quota_write(dquot->dq_sb, type, (char *)&dqblk,
75 sizeof(struct v1_disk_dqblk), v1_dqoff(dquot->dq_id));
78 dquot->dq_sb->s_id);