Commit ac0e773718dc20551e72900d2e7eada96ac91100

Authored by Christoph Hellwig
Committed by Jan Kara
1 parent 5582c76f90

quota: drop permission checks from xfs_fs_set_xstate/xfs_fs_set_xquota

We already do these checks in the generic code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>

Showing 1 changed file with 0 additions and 4 deletions Side-by-side Diff

fs/xfs/linux-2.6/xfs_quotaops.c
... ... @@ -68,8 +68,6 @@
68 68 return -EROFS;
69 69 if (op != Q_XQUOTARM && !XFS_IS_QUOTA_RUNNING(mp))
70 70 return -ENOSYS;
71   - if (!capable(CAP_SYS_ADMIN))
72   - return -EPERM;
73 71  
74 72 if (uflags & XFS_QUOTA_UDQ_ACCT)
75 73 flags |= XFS_UQUOTA_ACCT;
... ... @@ -130,8 +128,6 @@
130 128 return -ENOSYS;
131 129 if (!XFS_IS_QUOTA_ON(mp))
132 130 return -ESRCH;
133   - if (!capable(CAP_SYS_ADMIN))
134   - return -EPERM;
135 131  
136 132 return -xfs_qm_scall_setqlim(mp, id, xfs_quota_type(type), fdq);
137 133 }