diff options
author | Jan Kara <jack@suse.cz> | 2014-10-01 05:19:12 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2014-11-10 04:06:18 -0500 |
commit | 507e1fa697097b4885008f16354822f8d0c33a5d (patch) | |
tree | 83e03ba8c0ef5e1518775a8c735a48b7b7034445 /fs/jfs | |
parent | 53873638bd7cbcbf43cea72f0eb0d2ee9260f059 (diff) |
jfs: Convert to private i_dquot field
Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
CC: jfs-discussion@lists.sourceforge.net
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/jfs_incore.h | 3 | ||||
-rw-r--r-- | fs/jfs/super.c | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/fs/jfs/jfs_incore.h b/fs/jfs/jfs_incore.h index cf47f09e8ac8..fa7e795bd8ae 100644 --- a/fs/jfs/jfs_incore.h +++ b/fs/jfs/jfs_incore.h | |||
@@ -94,6 +94,9 @@ struct jfs_inode_info { | |||
94 | unchar _inline_ea[128]; /* 128: inline extended attr */ | 94 | unchar _inline_ea[128]; /* 128: inline extended attr */ |
95 | } link; | 95 | } link; |
96 | } u; | 96 | } u; |
97 | #ifdef CONFIG_QUOTA | ||
98 | struct dquot *i_dquot[MAXQUOTAS]; | ||
99 | #endif | ||
97 | u32 dev; /* will die when we get wide dev_t */ | 100 | u32 dev; /* will die when we get wide dev_t */ |
98 | struct inode vfs_inode; | 101 | struct inode vfs_inode; |
99 | }; | 102 | }; |
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 93e897e588a8..16c3a9556634 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -117,6 +117,9 @@ static struct inode *jfs_alloc_inode(struct super_block *sb) | |||
117 | jfs_inode = kmem_cache_alloc(jfs_inode_cachep, GFP_NOFS); | 117 | jfs_inode = kmem_cache_alloc(jfs_inode_cachep, GFP_NOFS); |
118 | if (!jfs_inode) | 118 | if (!jfs_inode) |
119 | return NULL; | 119 | return NULL; |
120 | #ifdef CONFIG_QUOTA | ||
121 | memset(&jfs_inode->i_dquot, 0, sizeof(jfs_inode->i_dquot)); | ||
122 | #endif | ||
120 | return &jfs_inode->vfs_inode; | 123 | return &jfs_inode->vfs_inode; |
121 | } | 124 | } |
122 | 125 | ||
@@ -537,6 +540,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) | |||
537 | #ifdef CONFIG_QUOTA | 540 | #ifdef CONFIG_QUOTA |
538 | sb->dq_op = &dquot_operations; | 541 | sb->dq_op = &dquot_operations; |
539 | sb->s_qcop = &dquot_quotactl_ops; | 542 | sb->s_qcop = &dquot_quotactl_ops; |
543 | sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP; | ||
540 | #endif | 544 | #endif |
541 | 545 | ||
542 | /* | 546 | /* |
@@ -836,6 +840,10 @@ out: | |||
836 | return len - towrite; | 840 | return len - towrite; |
837 | } | 841 | } |
838 | 842 | ||
843 | static struct dquot **jfs_get_dquots(struct inode *inode) | ||
844 | { | ||
845 | return JFS_IP(inode)->i_dquot; | ||
846 | } | ||
839 | #endif | 847 | #endif |
840 | 848 | ||
841 | static const struct super_operations jfs_super_operations = { | 849 | static const struct super_operations jfs_super_operations = { |
@@ -854,6 +862,7 @@ static const struct super_operations jfs_super_operations = { | |||
854 | #ifdef CONFIG_QUOTA | 862 | #ifdef CONFIG_QUOTA |
855 | .quota_read = jfs_quota_read, | 863 | .quota_read = jfs_quota_read, |
856 | .quota_write = jfs_quota_write, | 864 | .quota_write = jfs_quota_write, |
865 | .get_dquots = jfs_get_dquots, | ||
857 | #endif | 866 | #endif |
858 | }; | 867 | }; |
859 | 868 | ||