aboutsummaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-09-30 10:43:09 +0200
committerJan Kara <jack@suse.cz>2014-11-10 10:06:08 +0100
commit2c5f648aa24a7c8f0668d8ce5722d69da5bef739 (patch)
tree569961ba122f15e947a0f0dbe71c6994b8e00b2c /fs/super.c
parentquota: Remove const from function declarations (diff)
downloadlinux-dev-2c5f648aa24a7c8f0668d8ce5722d69da5bef739.tar.xz
linux-dev-2c5f648aa24a7c8f0668d8ce5722d69da5bef739.zip
quota: Allow each filesystem to specify which quota types it supports
Currently all filesystems supporting VFS quota support user and group quotas. With introduction of project quotas this is going to change so make sure filesystem isn't called for quota type it doesn't support by introduction of a bitmask determining which quota types each filesystem supports. Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/super.c b/fs/super.c
index eae088f6aaae..4512281df8ff 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -218,6 +218,12 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags)
atomic_set(&s->s_active, 1);
mutex_init(&s->s_vfs_rename_mutex);
lockdep_set_class(&s->s_vfs_rename_mutex, &type->s_vfs_rename_key);
+ /*
+ * For now MAXQUOTAS check in do_quotactl() will limit quota type
+ * appropriately. When each fs sets allowed_types, we can remove the
+ * line below
+ */
+ s->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP | QTYPE_MASK_PRJ;
mutex_init(&s->s_dquot.dqio_mutex);
mutex_init(&s->s_dquot.dqonoff_mutex);
s->s_maxbytes = MAX_NON_LFS;