aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-09-29 08:58:25 -0400
committerJan Kara <jack@suse.cz>2014-11-10 04:06:11 -0500
commit96c7e0d964e278858552b8d5497f440b9027b292 (patch)
tree63dee42895ad92008b58195a0bc2fb350d3c3ebc /fs/ext4/super.c
parent4018cfbc8cc974d35c05d651456023426a12fbac (diff)
ext4: Convert to private i_dquot field
CC: linux-ext4@vger.kernel.org Acked-by: "Theodore Ts'o" <tytso@mit.edu> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 2c9e6864abd9..63e802b8ec68 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -892,6 +892,7 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)
892 spin_lock_init(&(ei->i_block_reservation_lock)); 892 spin_lock_init(&(ei->i_block_reservation_lock));
893#ifdef CONFIG_QUOTA 893#ifdef CONFIG_QUOTA
894 ei->i_reserved_quota = 0; 894 ei->i_reserved_quota = 0;
895 memset(&ei->i_dquot, 0, sizeof(ei->i_dquot));
895#endif 896#endif
896 ei->jinode = NULL; 897 ei->jinode = NULL;
897 INIT_LIST_HEAD(&ei->i_rsv_conversion_list); 898 INIT_LIST_HEAD(&ei->i_rsv_conversion_list);
@@ -1068,6 +1069,11 @@ static int ext4_quota_enable(struct super_block *sb, int type, int format_id,
1068 unsigned int flags); 1069 unsigned int flags);
1069static int ext4_enable_quotas(struct super_block *sb); 1070static int ext4_enable_quotas(struct super_block *sb);
1070 1071
1072static struct dquot **ext4_get_dquots(struct inode *inode)
1073{
1074 return EXT4_I(inode)->i_dquot;
1075}
1076
1071static const struct dquot_operations ext4_quota_operations = { 1077static const struct dquot_operations ext4_quota_operations = {
1072 .get_reserved_space = ext4_get_reserved_space, 1078 .get_reserved_space = ext4_get_reserved_space,
1073 .write_dquot = ext4_write_dquot, 1079 .write_dquot = ext4_write_dquot,
@@ -1117,6 +1123,7 @@ static const struct super_operations ext4_sops = {
1117#ifdef CONFIG_QUOTA 1123#ifdef CONFIG_QUOTA
1118 .quota_read = ext4_quota_read, 1124 .quota_read = ext4_quota_read,
1119 .quota_write = ext4_quota_write, 1125 .quota_write = ext4_quota_write,
1126 .get_dquots = ext4_get_dquots,
1120#endif 1127#endif
1121 .bdev_try_to_free_page = bdev_try_to_free_page, 1128 .bdev_try_to_free_page = bdev_try_to_free_page,
1122}; 1129};
@@ -3932,6 +3939,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
3932 sb->s_qcop = &ext4_qctl_sysfile_operations; 3939 sb->s_qcop = &ext4_qctl_sysfile_operations;
3933 else 3940 else
3934 sb->s_qcop = &ext4_qctl_operations; 3941 sb->s_qcop = &ext4_qctl_operations;
3942 sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP;
3935#endif 3943#endif
3936 memcpy(sb->s_uuid, es->s_uuid, sizeof(es->s_uuid)); 3944 memcpy(sb->s_uuid, es->s_uuid, sizeof(es->s_uuid));
3937 3945