summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_qm_syscalls.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2014-05-15 09:38:15 +1000
committerDave Chinner <david@fromorbit.com>2014-05-15 09:38:15 +1000
commitff14ee42a038cf48263ac8d2eca5d30196554b82 (patch)
treecee5ba7a2b08d7e4f48d974d08ecfc40c8bd1308 /fs/xfs/xfs_qm_syscalls.c
parentb76769294ba400415fc44038c21cc2df86f9a28b (diff)
parent8cfcc3e565bf15870efe801368a25ca98092e6e7 (diff)
Merge branch 'xfs-misc-fixes-1-for-3.16' into for-next
Diffstat (limited to 'fs/xfs/xfs_qm_syscalls.c')
-rw-r--r--fs/xfs/xfs_qm_syscalls.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
index 72cbe65e5e75..bbc813caba4c 100644
--- a/fs/xfs/xfs_qm_syscalls.c
+++ b/fs/xfs/xfs_qm_syscalls.c
@@ -278,9 +278,10 @@ xfs_qm_scall_trunc_qfiles(
xfs_mount_t *mp,
uint flags)
{
- int error;
+ int error = EINVAL;
- if (!xfs_sb_version_hasquota(&mp->m_sb) || flags == 0) {
+ if (!xfs_sb_version_hasquota(&mp->m_sb) || flags == 0 ||
+ (flags & ~XFS_DQ_ALLTYPES)) {
xfs_debug(mp, "%s: flags=%x m_qflags=%x",
__func__, flags, mp->m_qflags);
return XFS_ERROR(EINVAL);