|
@@ -211,7 +211,7 @@ static int quota_getquota(struct super_block *sb, int type, qid_t id,
|
|
if (!sb->s_qcop->get_dqblk)
|
|
if (!sb->s_qcop->get_dqblk)
|
|
return -ENOSYS;
|
|
return -ENOSYS;
|
|
qid = make_kqid(current_user_ns(), type, id);
|
|
qid = make_kqid(current_user_ns(), type, id);
|
|
- if (!qid_valid(qid))
|
|
|
|
|
|
+ if (!qid_has_mapping(sb->s_user_ns, qid))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
ret = sb->s_qcop->get_dqblk(sb, qid, &fdq);
|
|
ret = sb->s_qcop->get_dqblk(sb, qid, &fdq);
|
|
if (ret)
|
|
if (ret)
|
|
@@ -237,7 +237,7 @@ static int quota_getnextquota(struct super_block *sb, int type, qid_t id,
|
|
if (!sb->s_qcop->get_nextdqblk)
|
|
if (!sb->s_qcop->get_nextdqblk)
|
|
return -ENOSYS;
|
|
return -ENOSYS;
|
|
qid = make_kqid(current_user_ns(), type, id);
|
|
qid = make_kqid(current_user_ns(), type, id);
|
|
- if (!qid_valid(qid))
|
|
|
|
|
|
+ if (!qid_has_mapping(sb->s_user_ns, qid))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
ret = sb->s_qcop->get_nextdqblk(sb, &qid, &fdq);
|
|
ret = sb->s_qcop->get_nextdqblk(sb, &qid, &fdq);
|
|
if (ret)
|
|
if (ret)
|
|
@@ -288,7 +288,7 @@ static int quota_setquota(struct super_block *sb, int type, qid_t id,
|
|
if (!sb->s_qcop->set_dqblk)
|
|
if (!sb->s_qcop->set_dqblk)
|
|
return -ENOSYS;
|
|
return -ENOSYS;
|
|
qid = make_kqid(current_user_ns(), type, id);
|
|
qid = make_kqid(current_user_ns(), type, id);
|
|
- if (!qid_valid(qid))
|
|
|
|
|
|
+ if (!qid_has_mapping(sb->s_user_ns, qid))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
copy_from_if_dqblk(&fdq, &idq);
|
|
copy_from_if_dqblk(&fdq, &idq);
|
|
return sb->s_qcop->set_dqblk(sb, qid, &fdq);
|
|
return sb->s_qcop->set_dqblk(sb, qid, &fdq);
|
|
@@ -581,7 +581,7 @@ static int quota_setxquota(struct super_block *sb, int type, qid_t id,
|
|
if (!sb->s_qcop->set_dqblk)
|
|
if (!sb->s_qcop->set_dqblk)
|
|
return -ENOSYS;
|
|
return -ENOSYS;
|
|
qid = make_kqid(current_user_ns(), type, id);
|
|
qid = make_kqid(current_user_ns(), type, id);
|
|
- if (!qid_valid(qid))
|
|
|
|
|
|
+ if (!qid_has_mapping(sb->s_user_ns, qid))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
/* Are we actually setting timer / warning limits for all users? */
|
|
/* Are we actually setting timer / warning limits for all users? */
|
|
if (from_kqid(&init_user_ns, qid) == 0 &&
|
|
if (from_kqid(&init_user_ns, qid) == 0 &&
|
|
@@ -642,7 +642,7 @@ static int quota_getxquota(struct super_block *sb, int type, qid_t id,
|
|
if (!sb->s_qcop->get_dqblk)
|
|
if (!sb->s_qcop->get_dqblk)
|
|
return -ENOSYS;
|
|
return -ENOSYS;
|
|
qid = make_kqid(current_user_ns(), type, id);
|
|
qid = make_kqid(current_user_ns(), type, id);
|
|
- if (!qid_valid(qid))
|
|
|
|
|
|
+ if (!qid_has_mapping(sb->s_user_ns, qid))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
ret = sb->s_qcop->get_dqblk(sb, qid, &qdq);
|
|
ret = sb->s_qcop->get_dqblk(sb, qid, &qdq);
|
|
if (ret)
|
|
if (ret)
|
|
@@ -669,7 +669,7 @@ static int quota_getnextxquota(struct super_block *sb, int type, qid_t id,
|
|
if (!sb->s_qcop->get_nextdqblk)
|
|
if (!sb->s_qcop->get_nextdqblk)
|
|
return -ENOSYS;
|
|
return -ENOSYS;
|
|
qid = make_kqid(current_user_ns(), type, id);
|
|
qid = make_kqid(current_user_ns(), type, id);
|
|
- if (!qid_valid(qid))
|
|
|
|
|
|
+ if (!qid_has_mapping(sb->s_user_ns, qid))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
ret = sb->s_qcop->get_nextdqblk(sb, &qid, &qdq);
|
|
ret = sb->s_qcop->get_nextdqblk(sb, &qid, &qdq);
|
|
if (ret)
|
|
if (ret)
|