quota.c (d49d37624a1931c2f3b5d0cbe95bd5181cbdc279) | quota.c (cfd4c70a18c4e806aaac2f483153dae01e0ace1c) |
---|---|
1/* 2 * Quota code necessary even when VFS quota support is not compiled 3 * into the kernel. The interesting stuff is over in dquot.c, here 4 * we have symbols for initial quotactl(2) handling, the sysctl(2) 5 * variables, etc - things needed even when quota support disabled. 6 */ 7 8#include <linux/fs.h> --- 570 unchanged lines hidden (view full) --- 579 if (copy_from_user(&fdq, addr, sizeof(fdq))) 580 return -EFAULT; 581 if (!sb->s_qcop->set_dqblk) 582 return -ENOSYS; 583 qid = make_kqid(current_user_ns(), type, id); 584 if (!qid_has_mapping(sb->s_user_ns, qid)) 585 return -EINVAL; 586 /* Are we actually setting timer / warning limits for all users? */ | 1/* 2 * Quota code necessary even when VFS quota support is not compiled 3 * into the kernel. The interesting stuff is over in dquot.c, here 4 * we have symbols for initial quotactl(2) handling, the sysctl(2) 5 * variables, etc - things needed even when quota support disabled. 6 */ 7 8#include <linux/fs.h> --- 570 unchanged lines hidden (view full) --- 579 if (copy_from_user(&fdq, addr, sizeof(fdq))) 580 return -EFAULT; 581 if (!sb->s_qcop->set_dqblk) 582 return -ENOSYS; 583 qid = make_kqid(current_user_ns(), type, id); 584 if (!qid_has_mapping(sb->s_user_ns, qid)) 585 return -EINVAL; 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)) { 589 struct qc_info qinfo; 590 int ret; 591 592 if (!sb->s_qcop->set_info) 593 return -EINVAL; 594 copy_qcinfo_from_xfs_dqblk(&qinfo, &fdq); 595 ret = sb->s_qcop->set_info(sb, type, &qinfo); --- 279 unchanged lines hidden --- | 588 fdq.d_fieldmask & (FS_DQ_WARNS_MASK | FS_DQ_TIMER_MASK)) { 589 struct qc_info qinfo; 590 int ret; 591 592 if (!sb->s_qcop->set_info) 593 return -EINVAL; 594 copy_qcinfo_from_xfs_dqblk(&qinfo, &fdq); 595 ret = sb->s_qcop->set_info(sb, type, &qinfo); --- 279 unchanged lines hidden --- |