summaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub/quota.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2018-01-08 19:41:34 +0100
committerDarrick J. Wong <darrick.wong@oracle.com>2018-01-08 19:41:34 +0100
commit8e63083762d451d449fd9d280fd85c402a83d0f9 (patch)
tree72e9763760d7b31e7d6a77fdf485073b3b87b10c /fs/xfs/scrub/quota.c
parentxfs: factor out scrub input checking (diff)
downloadlinux-8e63083762d451d449fd9d280fd85c402a83d0f9.tar.xz
linux-8e63083762d451d449fd9d280fd85c402a83d0f9.zip
xfs: move all scrub input checking to xfs_scrub_validate
There were ad-hoc checks for some scrub types but not others; mark each scrub type with ... it's type, and use that to validate the allowed and/or required input fields. Moving these checks out of xfs_scrub_setup_ag_header makes it a thin wrapper, so unwrap it in the process. Signed-off-by: Eric Sandeen <sandeen@redhat.com> [darrick: add xfs_ prefix to enum, check scrub args after checking type] Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/scrub/quota.c')
-rw-r--r--fs/xfs/scrub/quota.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/xfs/scrub/quota.c b/fs/xfs/scrub/quota.c
index 3d9037eceaf1..51daa4ae2627 100644
--- a/fs/xfs/scrub/quota.c
+++ b/fs/xfs/scrub/quota.c
@@ -67,13 +67,6 @@ xfs_scrub_setup_quota(
{
uint dqtype;
- /*
- * If userspace gave us an AG number or inode data, they don't
- * know what they're doing. Get out.
- */
- if (sc->sm->sm_agno || sc->sm->sm_ino || sc->sm->sm_gen)
- return -EINVAL;
-
dqtype = xfs_scrub_quota_to_dqtype(sc);
if (dqtype == 0)
return -EINVAL;