aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-09-29 09:08:19 -0400
committerJan Kara <jack@suse.cz>2014-11-10 04:06:17 -0500
commit53873638bd7cbcbf43cea72f0eb0d2ee9260f059 (patch)
tree98adef3d5e044b2274cc681d253fa85bf9ca8ab9
parent1c92ec678f32a4fdb9c0f7294b4d6f506b9a4b84 (diff)
reiserfs: Convert to private i_dquot field
CC: reiserfs-devel@vger.kernel.org CC: Jeff Mahoney <jeffm@suse.de> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r--fs/reiserfs/reiserfs.h4
-rw-r--r--fs/reiserfs/super.c11
2 files changed, 15 insertions, 0 deletions
diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h
index 1894d96ccb7c..bb79cddf0a1f 100644
--- a/fs/reiserfs/reiserfs.h
+++ b/fs/reiserfs/reiserfs.h
@@ -97,6 +97,10 @@ struct reiserfs_inode_info {
97#ifdef CONFIG_REISERFS_FS_XATTR 97#ifdef CONFIG_REISERFS_FS_XATTR
98 struct rw_semaphore i_xattr_sem; 98 struct rw_semaphore i_xattr_sem;
99#endif 99#endif
100#ifdef CONFIG_QUOTA
101 struct dquot *i_dquot[MAXQUOTAS];
102#endif
103
100 struct inode vfs_inode; 104 struct inode vfs_inode;
101}; 105};
102 106
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index f1376c92cf74..ea63ab13ef92 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -594,6 +594,10 @@ static struct inode *reiserfs_alloc_inode(struct super_block *sb)
594 return NULL; 594 return NULL;
595 atomic_set(&ei->openers, 0); 595 atomic_set(&ei->openers, 0);
596 mutex_init(&ei->tailpack); 596 mutex_init(&ei->tailpack);
597#ifdef CONFIG_QUOTA
598 memset(&ei->i_dquot, 0, sizeof(ei->i_dquot));
599#endif
600
597 return &ei->vfs_inode; 601 return &ei->vfs_inode;
598} 602}
599 603
@@ -750,6 +754,11 @@ static ssize_t reiserfs_quota_write(struct super_block *, int, const char *,
750 size_t, loff_t); 754 size_t, loff_t);
751static ssize_t reiserfs_quota_read(struct super_block *, int, char *, size_t, 755static ssize_t reiserfs_quota_read(struct super_block *, int, char *, size_t,
752 loff_t); 756 loff_t);
757
758static struct dquot **reiserfs_get_dquots(struct inode *inode)
759{
760 return REISERFS_I(inode)->i_dquot;
761}
753#endif 762#endif
754 763
755static const struct super_operations reiserfs_sops = { 764static const struct super_operations reiserfs_sops = {
@@ -768,6 +777,7 @@ static const struct super_operations reiserfs_sops = {
768#ifdef CONFIG_QUOTA 777#ifdef CONFIG_QUOTA
769 .quota_read = reiserfs_quota_read, 778 .quota_read = reiserfs_quota_read,
770 .quota_write = reiserfs_quota_write, 779 .quota_write = reiserfs_quota_write,
780 .get_dquots = reiserfs_get_dquots,
771#endif 781#endif
772}; 782};
773 783
@@ -1633,6 +1643,7 @@ static int read_super_block(struct super_block *s, int offset)
1633#ifdef CONFIG_QUOTA 1643#ifdef CONFIG_QUOTA
1634 s->s_qcop = &reiserfs_qctl_operations; 1644 s->s_qcop = &reiserfs_qctl_operations;
1635 s->dq_op = &reiserfs_quota_operations; 1645 s->dq_op = &reiserfs_quota_operations;
1646 s->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP;
1636#endif 1647#endif
1637 1648
1638 /* 1649 /*