summaryrefslogtreecommitdiff
path: root/fs/jfs/super.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-10-01 11:19:12 +0200
committerJan Kara <jack@suse.cz>2014-11-10 10:06:18 +0100
commit507e1fa697097b4885008f16354822f8d0c33a5d (patch)
tree83e03ba8c0ef5e1518775a8c735a48b7b7034445 /fs/jfs/super.c
parent53873638bd7cbcbf43cea72f0eb0d2ee9260f059 (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/super.c')
-rw-r--r--fs/jfs/super.c9
1 files changed, 9 insertions, 0 deletions
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)
jfs_inode = kmem_cache_alloc(jfs_inode_cachep, GFP_NOFS);
if (!jfs_inode)
return NULL;
+#ifdef CONFIG_QUOTA
+ memset(&jfs_inode->i_dquot, 0, sizeof(jfs_inode->i_dquot));
+#endif
return &jfs_inode->vfs_inode;
}
@@ -537,6 +540,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
#ifdef CONFIG_QUOTA
sb->dq_op = &dquot_operations;
sb->s_qcop = &dquot_quotactl_ops;
+ sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP;
#endif
/*
@@ -836,6 +840,10 @@ out:
return len - towrite;
}
+static struct dquot **jfs_get_dquots(struct inode *inode)
+{
+ return JFS_IP(inode)->i_dquot;
+}
#endif
static const struct super_operations jfs_super_operations = {
@@ -854,6 +862,7 @@ static const struct super_operations jfs_super_operations = {
#ifdef CONFIG_QUOTA
.quota_read = jfs_quota_read,
.quota_write = jfs_quota_write,
+ .get_dquots = jfs_get_dquots,
#endif
};