diff options
| author | Dave Chinner <david@fromorbit.com> | 2014-05-15 09:38:15 +1000 |
|---|---|---|
| committer | Dave Chinner <david@fromorbit.com> | 2014-05-15 09:38:15 +1000 |
| commit | ff14ee42a038cf48263ac8d2eca5d30196554b82 (patch) | |
| tree | cee5ba7a2b08d7e4f48d974d08ecfc40c8bd1308 /fs/xfs/xfs_quotaops.c | |
| parent | b76769294ba400415fc44038c21cc2df86f9a28b (diff) | |
| parent | 8cfcc3e565bf15870efe801368a25ca98092e6e7 (diff) | |
| download | linux-ff14ee42a038cf48263ac8d2eca5d30196554b82.tar.gz linux-ff14ee42a038cf48263ac8d2eca5d30196554b82.tar.bz2 linux-ff14ee42a038cf48263ac8d2eca5d30196554b82.zip | |
Merge branch 'xfs-misc-fixes-1-for-3.16' into for-next
Diffstat (limited to 'fs/xfs/xfs_quotaops.c')
| -rw-r--r-- | fs/xfs/xfs_quotaops.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/fs/xfs/xfs_quotaops.c b/fs/xfs/xfs_quotaops.c index af33cafe69b6..2ad1b9822e92 100644 --- a/fs/xfs/xfs_quotaops.c +++ b/fs/xfs/xfs_quotaops.c @@ -100,16 +100,36 @@ xfs_fs_set_xstate( if (!XFS_IS_QUOTA_ON(mp)) return -EINVAL; return -xfs_qm_scall_quotaoff(mp, flags); - case Q_XQUOTARM: - if (XFS_IS_QUOTA_ON(mp)) - return -EINVAL; - return -xfs_qm_scall_trunc_qfiles(mp, flags); } return -EINVAL; } STATIC int +xfs_fs_rm_xquota( + struct super_block *sb, + unsigned int uflags) +{ + struct xfs_mount *mp = XFS_M(sb); + unsigned int flags = 0; + + if (sb->s_flags & MS_RDONLY) + return -EROFS; + + if (XFS_IS_QUOTA_ON(mp)) + return -EINVAL; + + if (uflags & FS_USER_QUOTA) + flags |= XFS_DQ_USER; + if (uflags & FS_GROUP_QUOTA) + flags |= XFS_DQ_GROUP; + if (uflags & FS_USER_QUOTA) + flags |= XFS_DQ_PROJ; + + return -xfs_qm_scall_trunc_qfiles(mp, flags); +} + +STATIC int xfs_fs_get_dqblk( struct super_block *sb, struct kqid qid, @@ -149,6 +169,7 @@ const struct quotactl_ops xfs_quotactl_operations = { .get_xstatev = xfs_fs_get_xstatev, .get_xstate = xfs_fs_get_xstate, .set_xstate = xfs_fs_set_xstate, + .rm_xquota = xfs_fs_rm_xquota, .get_dqblk = xfs_fs_get_dqblk, .set_dqblk = xfs_fs_set_dqblk, }; |
