summaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota/xfs_qm_syscalls.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2005-11-02 10:31:41 +1100
committerNathan Scott <nathans@sgi.com>2005-11-02 10:31:41 +1100
commitc310ab6c071a688e5291028972d1ae8314f67536 (patch)
tree7ee30ba83f67139e5353ae45b8e18d9097198009 /fs/xfs/quota/xfs_qm_syscalls.c
parent30dab21abbca37636091a6d02e94dbcd6e07b530 (diff)
downloadlinux-c310ab6c071a688e5291028972d1ae8314f67536.tar.gz
linux-c310ab6c071a688e5291028972d1ae8314f67536.tar.bz2
linux-c310ab6c071a688e5291028972d1ae8314f67536.zip
[XFS] Fix signedness issues in dquot ID handling, allowing uids/gids above
MAXINT SGI-PV: 942528 SGI-Modid: xfs-linux:xfs-kern:23828a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/quota/xfs_qm_syscalls.c')
-rw-r--r--fs/xfs/quota/xfs_qm_syscalls.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c
index 15e02e8a9d4f..4e397940b3a6 100644
--- a/fs/xfs/quota/xfs_qm_syscalls.c
+++ b/fs/xfs/quota/xfs_qm_syscalls.c
@@ -109,10 +109,7 @@ xfs_qm_quotactl(
vfsp = bhvtovfs(bdp);
mp = XFS_VFSTOM(vfsp);
- if (addr == NULL && cmd != Q_SYNC)
- return XFS_ERROR(EINVAL);
- if (id < 0 && cmd != Q_SYNC)
- return XFS_ERROR(EINVAL);
+ ASSERT(addr != NULL);
/*
* The following commands are valid even when quotaoff.
@@ -122,7 +119,7 @@ xfs_qm_quotactl(
/*
* Truncate quota files. quota must be off.
*/
- if (XFS_IS_QUOTA_ON(mp) || addr == NULL)
+ if (XFS_IS_QUOTA_ON(mp))
return XFS_ERROR(EINVAL);
if (vfsp->vfs_flag & VFS_RDONLY)
return XFS_ERROR(EROFS);
@@ -140,8 +137,6 @@ xfs_qm_quotactl(
* QUOTAON - enabling quota enforcement.
* Quota accounting must be turned on at mount time.
*/
- if (addr == NULL)
- return XFS_ERROR(EINVAL);
if (vfsp->vfs_flag & VFS_RDONLY)
return XFS_ERROR(EROFS);
return (xfs_qm_scall_quotaon(mp,