aboutsummaryrefslogtreecommitdiffstats
path: root/fs/quota/quota.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/quota/quota.c')
-rw-r--r--fs/quota/quota.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index 0f10ee9892ce..35df08ee9c97 100644
--- a/fs/quota/quota.c
+++ b/fs/quota/quota.c
@@ -211,7 +211,7 @@ static int quota_getquota(struct super_block *sb, int type, qid_t id,
211 if (!sb->s_qcop->get_dqblk) 211 if (!sb->s_qcop->get_dqblk)
212 return -ENOSYS; 212 return -ENOSYS;
213 qid = make_kqid(current_user_ns(), type, id); 213 qid = make_kqid(current_user_ns(), type, id);
214 if (!qid_valid(qid)) 214 if (!qid_has_mapping(sb->s_user_ns, qid))
215 return -EINVAL; 215 return -EINVAL;
216 ret = sb->s_qcop->get_dqblk(sb, qid, &fdq); 216 ret = sb->s_qcop->get_dqblk(sb, qid, &fdq);
217 if (ret) 217 if (ret)
@@ -237,7 +237,7 @@ static int quota_getnextquota(struct super_block *sb, int type, qid_t id,
237 if (!sb->s_qcop->get_nextdqblk) 237 if (!sb->s_qcop->get_nextdqblk)
238 return -ENOSYS; 238 return -ENOSYS;
239 qid = make_kqid(current_user_ns(), type, id); 239 qid = make_kqid(current_user_ns(), type, id);
240 if (!qid_valid(qid)) 240 if (!qid_has_mapping(sb->s_user_ns, qid))
241 return -EINVAL; 241 return -EINVAL;
242 ret = sb->s_qcop->get_nextdqblk(sb, &qid, &fdq); 242 ret = sb->s_qcop->get_nextdqblk(sb, &qid, &fdq);
243 if (ret) 243 if (ret)
@@ -288,7 +288,7 @@ static int quota_setquota(struct super_block *sb, int type, qid_t id,
288 if (!sb->s_qcop->set_dqblk) 288 if (!sb->s_qcop->set_dqblk)
289 return -ENOSYS; 289 return -ENOSYS;
290 qid = make_kqid(current_user_ns(), type, id); 290 qid = make_kqid(current_user_ns(), type, id);
291 if (!qid_valid(qid)) 291 if (!qid_has_mapping(sb->s_user_ns, qid))
292 return -EINVAL; 292 return -EINVAL;
293 copy_from_if_dqblk(&fdq, &idq); 293 copy_from_if_dqblk(&fdq, &idq);
294 return sb->s_qcop->set_dqblk(sb, qid, &fdq); 294 return sb->s_qcop->set_dqblk(sb, qid, &fdq);
@@ -581,10 +581,10 @@ static int quota_setxquota(struct super_block *sb, int type, qid_t id,
581 if (!sb->s_qcop->set_dqblk) 581 if (!sb->s_qcop->set_dqblk)
582 return -ENOSYS; 582 return -ENOSYS;
583 qid = make_kqid(current_user_ns(), type, id); 583 qid = make_kqid(current_user_ns(), type, id);
584 if (!qid_valid(qid)) 584 if (!qid_has_mapping(sb->s_user_ns, qid))
585 return -EINVAL; 585 return -EINVAL;
586 /* Are we actually setting timer / warning limits for all users? */ 586 /* Are we actually setting timer / warning limits for all users? */
587 if (from_kqid(&init_user_ns, qid) == 0 && 587 if (from_kqid(sb->s_user_ns, qid) == 0 &&
588 fdq.d_fieldmask & (FS_DQ_WARNS_MASK | FS_DQ_TIMER_MASK)) { 588 fdq.d_fieldmask & (FS_DQ_WARNS_MASK | FS_DQ_TIMER_MASK)) {
589 struct qc_info qinfo; 589 struct qc_info qinfo;
590 int ret; 590 int ret;
@@ -642,7 +642,7 @@ static int quota_getxquota(struct super_block *sb, int type, qid_t id,
642 if (!sb->s_qcop->get_dqblk) 642 if (!sb->s_qcop->get_dqblk)
643 return -ENOSYS; 643 return -ENOSYS;
644 qid = make_kqid(current_user_ns(), type, id); 644 qid = make_kqid(current_user_ns(), type, id);
645 if (!qid_valid(qid)) 645 if (!qid_has_mapping(sb->s_user_ns, qid))
646 return -EINVAL; 646 return -EINVAL;
647 ret = sb->s_qcop->get_dqblk(sb, qid, &qdq); 647 ret = sb->s_qcop->get_dqblk(sb, qid, &qdq);
648 if (ret) 648 if (ret)
@@ -669,7 +669,7 @@ static int quota_getnextxquota(struct super_block *sb, int type, qid_t id,
669 if (!sb->s_qcop->get_nextdqblk) 669 if (!sb->s_qcop->get_nextdqblk)
670 return -ENOSYS; 670 return -ENOSYS;
671 qid = make_kqid(current_user_ns(), type, id); 671 qid = make_kqid(current_user_ns(), type, id);
672 if (!qid_valid(qid)) 672 if (!qid_has_mapping(sb->s_user_ns, qid))
673 return -EINVAL; 673 return -EINVAL;
674 ret = sb->s_qcop->get_nextdqblk(sb, &qid, &qdq); 674 ret = sb->s_qcop->get_nextdqblk(sb, &qid, &qdq);
675 if (ret) 675 if (ret)