diff options
-rw-r--r-- | fs/ocfs2/super.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 83723179e1ec..706c71c2955d 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -1000,36 +1000,6 @@ static void ocfs2_disable_quotas(struct ocfs2_super *osb) | |||
1000 | } | 1000 | } |
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | /* Handle quota on quotactl */ | ||
1004 | static int ocfs2_quota_on(struct super_block *sb, int type, int format_id) | ||
1005 | { | ||
1006 | unsigned int feature[OCFS2_MAXQUOTAS] = { | ||
1007 | OCFS2_FEATURE_RO_COMPAT_USRQUOTA, | ||
1008 | OCFS2_FEATURE_RO_COMPAT_GRPQUOTA}; | ||
1009 | |||
1010 | if (!OCFS2_HAS_RO_COMPAT_FEATURE(sb, feature[type])) | ||
1011 | return -EINVAL; | ||
1012 | |||
1013 | return dquot_enable(sb_dqopt(sb)->files[type], type, | ||
1014 | format_id, DQUOT_LIMITS_ENABLED); | ||
1015 | } | ||
1016 | |||
1017 | /* Handle quota off quotactl */ | ||
1018 | static int ocfs2_quota_off(struct super_block *sb, int type) | ||
1019 | { | ||
1020 | return dquot_disable(sb, type, DQUOT_LIMITS_ENABLED); | ||
1021 | } | ||
1022 | |||
1023 | static const struct quotactl_ops ocfs2_quotactl_ops = { | ||
1024 | .quota_on_meta = ocfs2_quota_on, | ||
1025 | .quota_off = ocfs2_quota_off, | ||
1026 | .quota_sync = dquot_quota_sync, | ||
1027 | .get_info = dquot_get_dqinfo, | ||
1028 | .set_info = dquot_set_dqinfo, | ||
1029 | .get_dqblk = dquot_get_dqblk, | ||
1030 | .set_dqblk = dquot_set_dqblk, | ||
1031 | }; | ||
1032 | |||
1033 | static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) | 1003 | static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) |
1034 | { | 1004 | { |
1035 | struct dentry *root; | 1005 | struct dentry *root; |
@@ -2079,7 +2049,7 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
2079 | sb->s_op = &ocfs2_sops; | 2049 | sb->s_op = &ocfs2_sops; |
2080 | sb->s_d_op = &ocfs2_dentry_ops; | 2050 | sb->s_d_op = &ocfs2_dentry_ops; |
2081 | sb->s_export_op = &ocfs2_export_ops; | 2051 | sb->s_export_op = &ocfs2_export_ops; |
2082 | sb->s_qcop = &ocfs2_quotactl_ops; | 2052 | sb->s_qcop = &dquot_quotactl_sysfile_ops; |
2083 | sb->dq_op = &ocfs2_quota_operations; | 2053 | sb->dq_op = &ocfs2_quota_operations; |
2084 | sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP; | 2054 | sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP; |
2085 | sb->s_xattr = ocfs2_xattr_handlers; | 2055 | sb->s_xattr = ocfs2_xattr_handlers; |