From c310ab6c071a688e5291028972d1ae8314f67536 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Wed, 2 Nov 2005 10:31:41 +1100 Subject: [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 --- fs/xfs/quota/xfs_qm_syscalls.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'fs/xfs/quota/xfs_qm_syscalls.c') diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c index 15e02e8a9d4..4e397940b3a 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, -- cgit v1.2.3