|
@@ -175,6 +175,7 @@ static ssize_t quota_sync_store(struct gfs2_sbd *sdp, const char *buf,
|
|
|
static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf,
|
|
|
size_t len)
|
|
|
{
|
|
|
+ struct kqid qid;
|
|
|
int error;
|
|
|
u32 id;
|
|
|
|
|
@@ -183,13 +184,18 @@ static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf,
|
|
|
|
|
|
id = simple_strtoul(buf, NULL, 0);
|
|
|
|
|
|
- error = gfs2_quota_refresh(sdp, 1, id);
|
|
|
+ qid = make_kqid(current_user_ns(), USRQUOTA, id);
|
|
|
+ if (!qid_valid(qid))
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
+ error = gfs2_quota_refresh(sdp, qid);
|
|
|
return error ? error : len;
|
|
|
}
|
|
|
|
|
|
static ssize_t quota_refresh_group_store(struct gfs2_sbd *sdp, const char *buf,
|
|
|
size_t len)
|
|
|
{
|
|
|
+ struct kqid qid;
|
|
|
int error;
|
|
|
u32 id;
|
|
|
|
|
@@ -198,7 +204,11 @@ static ssize_t quota_refresh_group_store(struct gfs2_sbd *sdp, const char *buf,
|
|
|
|
|
|
id = simple_strtoul(buf, NULL, 0);
|
|
|
|
|
|
- error = gfs2_quota_refresh(sdp, 0, id);
|
|
|
+ qid = make_kqid(current_user_ns(), GRPQUOTA, id);
|
|
|
+ if (!qid_valid(qid))
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
+ error = gfs2_quota_refresh(sdp, qid);
|
|
|
return error ? error : len;
|
|
|
}
|
|
|
|