Lines Matching refs:dquot
56 static int v1_read_dqblk(struct dquot *dquot)
58 int type = dquot->dq_id.type;
60 struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
67 dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type, (char *)&dqblk,
69 v1_dqoff(from_kqid(&init_user_ns, dquot->dq_id)));
71 v1_disk2mem_dqblk(&dquot->dq_dqb, &dqblk);
72 if (dquot->dq_dqb.dqb_bhardlimit == 0 &&
73 dquot->dq_dqb.dqb_bsoftlimit == 0 &&
74 dquot->dq_dqb.dqb_ihardlimit == 0 &&
75 dquot->dq_dqb.dqb_isoftlimit == 0)
76 set_bit(DQ_FAKE_B, &dquot->dq_flags);
82 static int v1_commit_dqblk(struct dquot *dquot)
84 short type = dquot->dq_id.type;
88 v1_mem2disk_dqblk(&dqblk, &dquot->dq_dqb);
89 if (((type == USRQUOTA) && uid_eq(dquot->dq_id.uid, GLOBAL_ROOT_UID)) ||
90 ((type == GRPQUOTA) && gid_eq(dquot->dq_id.gid, GLOBAL_ROOT_GID))) {
92 sb_dqopt(dquot->dq_sb)->info[type].dqi_bgrace;
94 sb_dqopt(dquot->dq_sb)->info[type].dqi_igrace;
97 if (sb_dqopt(dquot->dq_sb)->files[type])
98 ret = dquot->dq_sb->s_op->quota_write(dquot->dq_sb, type,
100 v1_dqoff(from_kqid(&init_user_ns, dquot->dq_id)));
102 quota_error(dquot->dq_sb, "dquota write failed");