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