diff options
author | Jan Kara <jack@suse.cz> | 2014-09-25 10:44:45 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2014-11-10 04:06:10 -0500 |
commit | 64241118b718f6f1e7bbbad8c4567f36b65ca31a (patch) | |
tree | d8dbb3ed2093ca0c8bd3cf45d3d1d5a87ab028cd /fs/ext2/super.c | |
parent | 2d0fa467915ed0c5957c992011b7f142a7dedf8e (diff) |
ext2: Convert to private i_dquot field
CC: linux-ext4@vger.kernel.org
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext2/super.c')
-rw-r--r-- | fs/ext2/super.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 170dc41e8bf4..ae55fddc26a9 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
@@ -166,6 +166,10 @@ static struct inode *ext2_alloc_inode(struct super_block *sb) | |||
166 | return NULL; | 166 | return NULL; |
167 | ei->i_block_alloc_info = NULL; | 167 | ei->i_block_alloc_info = NULL; |
168 | ei->vfs_inode.i_version = 1; | 168 | ei->vfs_inode.i_version = 1; |
169 | #ifdef CONFIG_QUOTA | ||
170 | memset(&ei->i_dquot, 0, sizeof(ei->i_dquot)); | ||
171 | #endif | ||
172 | |||
169 | return &ei->vfs_inode; | 173 | return &ei->vfs_inode; |
170 | } | 174 | } |
171 | 175 | ||
@@ -303,6 +307,10 @@ static int ext2_show_options(struct seq_file *seq, struct dentry *root) | |||
303 | #ifdef CONFIG_QUOTA | 307 | #ifdef CONFIG_QUOTA |
304 | static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, size_t len, loff_t off); | 308 | static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, size_t len, loff_t off); |
305 | static ssize_t ext2_quota_write(struct super_block *sb, int type, const char *data, size_t len, loff_t off); | 309 | static ssize_t ext2_quota_write(struct super_block *sb, int type, const char *data, size_t len, loff_t off); |
310 | static struct dquot **ext2_get_dquots(struct inode *inode) | ||
311 | { | ||
312 | return EXT2_I(inode)->i_dquot; | ||
313 | } | ||
306 | #endif | 314 | #endif |
307 | 315 | ||
308 | static const struct super_operations ext2_sops = { | 316 | static const struct super_operations ext2_sops = { |
@@ -320,6 +328,7 @@ static const struct super_operations ext2_sops = { | |||
320 | #ifdef CONFIG_QUOTA | 328 | #ifdef CONFIG_QUOTA |
321 | .quota_read = ext2_quota_read, | 329 | .quota_read = ext2_quota_read, |
322 | .quota_write = ext2_quota_write, | 330 | .quota_write = ext2_quota_write, |
331 | .get_dquots = ext2_get_dquots, | ||
323 | #endif | 332 | #endif |
324 | }; | 333 | }; |
325 | 334 | ||
@@ -1090,6 +1099,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) | |||
1090 | #ifdef CONFIG_QUOTA | 1099 | #ifdef CONFIG_QUOTA |
1091 | sb->dq_op = &dquot_operations; | 1100 | sb->dq_op = &dquot_operations; |
1092 | sb->s_qcop = &dquot_quotactl_ops; | 1101 | sb->s_qcop = &dquot_quotactl_ops; |
1102 | sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP; | ||
1093 | #endif | 1103 | #endif |
1094 | 1104 | ||
1095 | root = ext2_iget(sb, EXT2_ROOT_INO); | 1105 | root = ext2_iget(sb, EXT2_ROOT_INO); |