aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-10 18:43:30 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-10 18:43:30 -0500
commit1366f5d3129f2abde606214de7afc3dd61781fa3 (patch)
treeb275b18e90bd24d64e09894a812bbd7dd1c424f5
parent4b0a268eeccae14d42ff5fb9f19b612913c0007c (diff)
parentfdf2657bc81b10dee856ec9f8fe5b201c0561e9d (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull quota updates from Jan Kara: "Quota improvements and some minor cleanups. The main portion in the pull request are changes which move i_dquot array from struct inode into fs-private part of an inode which saves memory for filesystems which don't use VFS quotas" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: One function call less in udf_fill_super() after error detection udf: Deletion of unnecessary checks before the function call "iput" jbd: Deletion of an unnecessary check before the function call "iput" vfs: Remove i_dquot field from inode jfs: Convert to private i_dquot field reiserfs: Convert to private i_dquot field ocfs2: Convert to private i_dquot field ext4: Convert to private i_dquot field ext3: Convert to private i_dquot field ext2: Convert to private i_dquot field quota: Use function to provide i_dquot pointers xfs: Set allowed quota types gfs2: Set allowed quota types quota: Allow each filesystem to specify which quota types it supports quota: Remove const from function declarations quota: Add log level to printk
-rw-r--r--fs/ext2/ext2.h3
-rw-r--r--fs/ext2/super.c10
-rw-r--r--fs/ext3/ext3.h4
-rw-r--r--fs/ext3/super.c10
-rw-r--r--fs/ext4/ext4.h4
-rw-r--r--fs/ext4/super.c8
-rw-r--r--fs/gfs2/ops_fstype.c1
-rw-r--r--fs/inode.c3
-rw-r--r--fs/jbd/journal.c3
-rw-r--r--fs/jfs/jfs_incore.h3
-rw-r--r--fs/jfs/super.c9
-rw-r--r--fs/ocfs2/inode.h2
-rw-r--r--fs/ocfs2/super.c8
-rw-r--r--fs/quota/dquot.c59
-rw-r--r--fs/quota/quota.c13
-rw-r--r--fs/reiserfs/reiserfs.h4
-rw-r--r--fs/reiserfs/super.c11
-rw-r--r--fs/udf/super.c11
-rw-r--r--fs/xfs/xfs_super.c1
-rw-r--r--include/linux/fs.h5
-rw-r--r--include/linux/quota.h5
-rw-r--r--include/linux/quotaops.h8
22 files changed, 138 insertions, 47 deletions
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
index d9a17d0b124d..e4279ead4a05 100644
--- a/fs/ext2/ext2.h
+++ b/fs/ext2/ext2.h
@@ -689,6 +689,9 @@ struct ext2_inode_info {
689 struct mutex truncate_mutex; 689 struct mutex truncate_mutex;
690 struct inode vfs_inode; 690 struct inode vfs_inode;
691 struct list_head i_orphan; /* unlinked but open inodes */ 691 struct list_head i_orphan; /* unlinked but open inodes */
692#ifdef CONFIG_QUOTA
693 struct dquot *i_dquot[MAXQUOTAS];
694#endif
692}; 695};
693 696
694/* 697/*
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
304static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, size_t len, loff_t off); 308static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, size_t len, loff_t off);
305static ssize_t ext2_quota_write(struct super_block *sb, int type, const char *data, size_t len, loff_t off); 309static ssize_t ext2_quota_write(struct super_block *sb, int type, const char *data, size_t len, loff_t off);
310static struct dquot **ext2_get_dquots(struct inode *inode)
311{
312 return EXT2_I(inode)->i_dquot;
313}
306#endif 314#endif
307 315
308static const struct super_operations ext2_sops = { 316static 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);
diff --git a/fs/ext3/ext3.h b/fs/ext3/ext3.h
index fc3cdcf24aed..f483a80b3fe7 100644
--- a/fs/ext3/ext3.h
+++ b/fs/ext3/ext3.h
@@ -615,6 +615,10 @@ struct ext3_inode_info {
615 atomic_t i_sync_tid; 615 atomic_t i_sync_tid;
616 atomic_t i_datasync_tid; 616 atomic_t i_datasync_tid;
617 617
618#ifdef CONFIG_QUOTA
619 struct dquot *i_dquot[MAXQUOTAS];
620#endif
621
618 struct inode vfs_inode; 622 struct inode vfs_inode;
619}; 623};
620 624
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index eb742d0e67ff..9b4e7d750d4f 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -485,6 +485,10 @@ static struct inode *ext3_alloc_inode(struct super_block *sb)
485 ei->vfs_inode.i_version = 1; 485 ei->vfs_inode.i_version = 1;
486 atomic_set(&ei->i_datasync_tid, 0); 486 atomic_set(&ei->i_datasync_tid, 0);
487 atomic_set(&ei->i_sync_tid, 0); 487 atomic_set(&ei->i_sync_tid, 0);
488#ifdef CONFIG_QUOTA
489 memset(&ei->i_dquot, 0, sizeof(ei->i_dquot));
490#endif
491
488 return &ei->vfs_inode; 492 return &ei->vfs_inode;
489} 493}
490 494
@@ -764,6 +768,10 @@ static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data,
764 size_t len, loff_t off); 768 size_t len, loff_t off);
765static ssize_t ext3_quota_write(struct super_block *sb, int type, 769static ssize_t ext3_quota_write(struct super_block *sb, int type,
766 const char *data, size_t len, loff_t off); 770 const char *data, size_t len, loff_t off);
771static struct dquot **ext3_get_dquots(struct inode *inode)
772{
773 return EXT3_I(inode)->i_dquot;
774}
767 775
768static const struct dquot_operations ext3_quota_operations = { 776static const struct dquot_operations ext3_quota_operations = {
769 .write_dquot = ext3_write_dquot, 777 .write_dquot = ext3_write_dquot,
@@ -803,6 +811,7 @@ static const struct super_operations ext3_sops = {
803#ifdef CONFIG_QUOTA 811#ifdef CONFIG_QUOTA
804 .quota_read = ext3_quota_read, 812 .quota_read = ext3_quota_read,
805 .quota_write = ext3_quota_write, 813 .quota_write = ext3_quota_write,
814 .get_dquots = ext3_get_dquots,
806#endif 815#endif
807 .bdev_try_to_free_page = bdev_try_to_free_page, 816 .bdev_try_to_free_page = bdev_try_to_free_page,
808}; 817};
@@ -2001,6 +2010,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
2001#ifdef CONFIG_QUOTA 2010#ifdef CONFIG_QUOTA
2002 sb->s_qcop = &ext3_qctl_operations; 2011 sb->s_qcop = &ext3_qctl_operations;
2003 sb->dq_op = &ext3_quota_operations; 2012 sb->dq_op = &ext3_quota_operations;
2013 sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP;
2004#endif 2014#endif
2005 memcpy(sb->s_uuid, es->s_uuid, sizeof(es->s_uuid)); 2015 memcpy(sb->s_uuid, es->s_uuid, sizeof(es->s_uuid));
2006 INIT_LIST_HEAD(&sbi->s_orphan); /* unlinked but open files */ 2016 INIT_LIST_HEAD(&sbi->s_orphan); /* unlinked but open files */
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index c55a1faaed58..db3f772e57ae 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -941,6 +941,10 @@ struct ext4_inode_info {
941 tid_t i_sync_tid; 941 tid_t i_sync_tid;
942 tid_t i_datasync_tid; 942 tid_t i_datasync_tid;
943 943
944#ifdef CONFIG_QUOTA
945 struct dquot *i_dquot[MAXQUOTAS];
946#endif
947
944 /* Precomputed uuid+inum+igen checksum for seeding inode checksums */ 948 /* Precomputed uuid+inum+igen checksum for seeding inode checksums */
945 __u32 i_csum_seed; 949 __u32 i_csum_seed;
946}; 950};
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
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index b5803acb8818..8633ad328ee2 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -1074,6 +1074,7 @@ static int fill_super(struct super_block *sb, struct gfs2_args *args, int silent
1074 sb->s_export_op = &gfs2_export_ops; 1074 sb->s_export_op = &gfs2_export_ops;
1075 sb->s_xattr = gfs2_xattr_handlers; 1075 sb->s_xattr = gfs2_xattr_handlers;
1076 sb->s_qcop = &gfs2_quotactl_ops; 1076 sb->s_qcop = &gfs2_quotactl_ops;
1077 sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP;
1077 sb_dqopt(sb)->flags |= DQUOT_QUOTA_SYS_FILE; 1078 sb_dqopt(sb)->flags |= DQUOT_QUOTA_SYS_FILE;
1078 sb->s_time_gran = 1; 1079 sb->s_time_gran = 1;
1079 sb->s_maxbytes = MAX_LFS_FILESIZE; 1080 sb->s_maxbytes = MAX_LFS_FILESIZE;
diff --git a/fs/inode.c b/fs/inode.c
index 26753ba7b6d6..2ed95f7caa4f 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -143,9 +143,6 @@ int inode_init_always(struct super_block *sb, struct inode *inode)
143 inode->i_blocks = 0; 143 inode->i_blocks = 0;
144 inode->i_bytes = 0; 144 inode->i_bytes = 0;
145 inode->i_generation = 0; 145 inode->i_generation = 0;
146#ifdef CONFIG_QUOTA
147 memset(&inode->i_dquot, 0, sizeof(inode->i_dquot));
148#endif
149 inode->i_pipe = NULL; 146 inode->i_pipe = NULL;
150 inode->i_bdev = NULL; 147 inode->i_bdev = NULL;
151 inode->i_cdev = NULL; 148 inode->i_cdev = NULL;
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
index aab8549591e7..c46a79adb6ad 100644
--- a/fs/jbd/journal.c
+++ b/fs/jbd/journal.c
@@ -1373,8 +1373,7 @@ int journal_destroy(journal_t *journal)
1373 } 1373 }
1374 mutex_unlock(&journal->j_checkpoint_mutex); 1374 mutex_unlock(&journal->j_checkpoint_mutex);
1375 1375
1376 if (journal->j_inode) 1376 iput(journal->j_inode);
1377 iput(journal->j_inode);
1378 if (journal->j_revoke) 1377 if (journal->j_revoke)
1379 journal_destroy_revoke(journal); 1378 journal_destroy_revoke(journal);
1380 kfree(journal->j_wbuf); 1379 kfree(journal->j_wbuf);
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
843static struct dquot **jfs_get_dquots(struct inode *inode)
844{
845 return JFS_IP(inode)->i_dquot;
846}
839#endif 847#endif
840 848
841static const struct super_operations jfs_super_operations = { 849static 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
diff --git a/fs/ocfs2/inode.h b/fs/ocfs2/inode.h
index a9b76de46047..ca3431ee7f24 100644
--- a/fs/ocfs2/inode.h
+++ b/fs/ocfs2/inode.h
@@ -80,6 +80,8 @@ struct ocfs2_inode_info
80 */ 80 */
81 tid_t i_sync_tid; 81 tid_t i_sync_tid;
82 tid_t i_datasync_tid; 82 tid_t i_datasync_tid;
83
84 struct dquot *i_dquot[MAXQUOTAS];
83}; 85};
84 86
85/* 87/*
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 93c85bc745e1..0945814ddb7b 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -143,6 +143,11 @@ static int ocfs2_susp_quotas(struct ocfs2_super *osb, int unsuspend);
143static int ocfs2_enable_quotas(struct ocfs2_super *osb); 143static int ocfs2_enable_quotas(struct ocfs2_super *osb);
144static void ocfs2_disable_quotas(struct ocfs2_super *osb); 144static void ocfs2_disable_quotas(struct ocfs2_super *osb);
145 145
146static struct dquot **ocfs2_get_dquots(struct inode *inode)
147{
148 return OCFS2_I(inode)->i_dquot;
149}
150
146static const struct super_operations ocfs2_sops = { 151static const struct super_operations ocfs2_sops = {
147 .statfs = ocfs2_statfs, 152 .statfs = ocfs2_statfs,
148 .alloc_inode = ocfs2_alloc_inode, 153 .alloc_inode = ocfs2_alloc_inode,
@@ -155,6 +160,7 @@ static const struct super_operations ocfs2_sops = {
155 .show_options = ocfs2_show_options, 160 .show_options = ocfs2_show_options,
156 .quota_read = ocfs2_quota_read, 161 .quota_read = ocfs2_quota_read,
157 .quota_write = ocfs2_quota_write, 162 .quota_write = ocfs2_quota_write,
163 .get_dquots = ocfs2_get_dquots,
158}; 164};
159 165
160enum { 166enum {
@@ -563,6 +569,7 @@ static struct inode *ocfs2_alloc_inode(struct super_block *sb)
563 569
564 oi->i_sync_tid = 0; 570 oi->i_sync_tid = 0;
565 oi->i_datasync_tid = 0; 571 oi->i_datasync_tid = 0;
572 memset(&oi->i_dquot, 0, sizeof(oi->i_dquot));
566 573
567 jbd2_journal_init_jbd_inode(&oi->ip_jinode, &oi->vfs_inode); 574 jbd2_journal_init_jbd_inode(&oi->ip_jinode, &oi->vfs_inode);
568 return &oi->vfs_inode; 575 return &oi->vfs_inode;
@@ -2073,6 +2080,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
2073 sb->s_export_op = &ocfs2_export_ops; 2080 sb->s_export_op = &ocfs2_export_ops;
2074 sb->s_qcop = &ocfs2_quotactl_ops; 2081 sb->s_qcop = &ocfs2_quotactl_ops;
2075 sb->dq_op = &ocfs2_quota_operations; 2082 sb->dq_op = &ocfs2_quota_operations;
2083 sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP;
2076 sb->s_xattr = ocfs2_xattr_handlers; 2084 sb->s_xattr = ocfs2_xattr_handlers;
2077 sb->s_time_gran = 1; 2085 sb->s_time_gran = 1;
2078 sb->s_flags |= MS_NOATIME; 2086 sb->s_flags |= MS_NOATIME;
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 6b4527216a7f..8f0acef3d184 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -893,6 +893,11 @@ out:
893} 893}
894EXPORT_SYMBOL(dqget); 894EXPORT_SYMBOL(dqget);
895 895
896static inline struct dquot **i_dquot(struct inode *inode)
897{
898 return inode->i_sb->s_op->get_dquots(inode);
899}
900
896static int dqinit_needed(struct inode *inode, int type) 901static int dqinit_needed(struct inode *inode, int type)
897{ 902{
898 int cnt; 903 int cnt;
@@ -900,9 +905,9 @@ static int dqinit_needed(struct inode *inode, int type)
900 if (IS_NOQUOTA(inode)) 905 if (IS_NOQUOTA(inode))
901 return 0; 906 return 0;
902 if (type != -1) 907 if (type != -1)
903 return !inode->i_dquot[type]; 908 return !i_dquot(inode)[type];
904 for (cnt = 0; cnt < MAXQUOTAS; cnt++) 909 for (cnt = 0; cnt < MAXQUOTAS; cnt++)
905 if (!inode->i_dquot[cnt]) 910 if (!i_dquot(inode)[cnt])
906 return 1; 911 return 1;
907 return 0; 912 return 0;
908} 913}
@@ -965,9 +970,9 @@ static void add_dquot_ref(struct super_block *sb, int type)
965static void remove_inode_dquot_ref(struct inode *inode, int type, 970static void remove_inode_dquot_ref(struct inode *inode, int type,
966 struct list_head *tofree_head) 971 struct list_head *tofree_head)
967{ 972{
968 struct dquot *dquot = inode->i_dquot[type]; 973 struct dquot *dquot = i_dquot(inode)[type];
969 974
970 inode->i_dquot[type] = NULL; 975 i_dquot(inode)[type] = NULL;
971 if (!dquot) 976 if (!dquot)
972 return; 977 return;
973 978
@@ -1402,7 +1407,7 @@ static void __dquot_initialize(struct inode *inode, int type)
1402 * we check it without locking here to avoid unnecessary 1407 * we check it without locking here to avoid unnecessary
1403 * dqget()/dqput() calls. 1408 * dqget()/dqput() calls.
1404 */ 1409 */
1405 if (inode->i_dquot[cnt]) 1410 if (i_dquot(inode)[cnt])
1406 continue; 1411 continue;
1407 init_needed = 1; 1412 init_needed = 1;
1408 1413
@@ -1433,8 +1438,8 @@ static void __dquot_initialize(struct inode *inode, int type)
1433 /* We could race with quotaon or dqget() could have failed */ 1438 /* We could race with quotaon or dqget() could have failed */
1434 if (!got[cnt]) 1439 if (!got[cnt])
1435 continue; 1440 continue;
1436 if (!inode->i_dquot[cnt]) { 1441 if (!i_dquot(inode)[cnt]) {
1437 inode->i_dquot[cnt] = got[cnt]; 1442 i_dquot(inode)[cnt] = got[cnt];
1438 got[cnt] = NULL; 1443 got[cnt] = NULL;
1439 /* 1444 /*
1440 * Make quota reservation system happy if someone 1445 * Make quota reservation system happy if someone
@@ -1442,7 +1447,7 @@ static void __dquot_initialize(struct inode *inode, int type)
1442 */ 1447 */
1443 rsv = inode_get_rsv_space(inode); 1448 rsv = inode_get_rsv_space(inode);
1444 if (unlikely(rsv)) 1449 if (unlikely(rsv))
1445 dquot_resv_space(inode->i_dquot[cnt], rsv); 1450 dquot_resv_space(i_dquot(inode)[cnt], rsv);
1446 } 1451 }
1447 } 1452 }
1448out_err: 1453out_err:
@@ -1472,8 +1477,8 @@ static void __dquot_drop(struct inode *inode)
1472 1477
1473 spin_lock(&dq_data_lock); 1478 spin_lock(&dq_data_lock);
1474 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { 1479 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1475 put[cnt] = inode->i_dquot[cnt]; 1480 put[cnt] = i_dquot(inode)[cnt];
1476 inode->i_dquot[cnt] = NULL; 1481 i_dquot(inode)[cnt] = NULL;
1477 } 1482 }
1478 spin_unlock(&dq_data_lock); 1483 spin_unlock(&dq_data_lock);
1479 dqput_all(put); 1484 dqput_all(put);
@@ -1494,7 +1499,7 @@ void dquot_drop(struct inode *inode)
1494 * add quota pointers back anyway. 1499 * add quota pointers back anyway.
1495 */ 1500 */
1496 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { 1501 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1497 if (inode->i_dquot[cnt]) 1502 if (i_dquot(inode)[cnt])
1498 break; 1503 break;
1499 } 1504 }
1500 1505
@@ -1595,7 +1600,7 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
1595{ 1600{
1596 int cnt, ret = 0, index; 1601 int cnt, ret = 0, index;
1597 struct dquot_warn warn[MAXQUOTAS]; 1602 struct dquot_warn warn[MAXQUOTAS];
1598 struct dquot **dquots = inode->i_dquot; 1603 struct dquot **dquots = i_dquot(inode);
1599 int reserve = flags & DQUOT_SPACE_RESERVE; 1604 int reserve = flags & DQUOT_SPACE_RESERVE;
1600 1605
1601 if (!dquot_active(inode)) { 1606 if (!dquot_active(inode)) {
@@ -1643,11 +1648,11 @@ EXPORT_SYMBOL(__dquot_alloc_space);
1643/* 1648/*
1644 * This operation can block, but only after everything is updated 1649 * This operation can block, but only after everything is updated
1645 */ 1650 */
1646int dquot_alloc_inode(const struct inode *inode) 1651int dquot_alloc_inode(struct inode *inode)
1647{ 1652{
1648 int cnt, ret = 0, index; 1653 int cnt, ret = 0, index;
1649 struct dquot_warn warn[MAXQUOTAS]; 1654 struct dquot_warn warn[MAXQUOTAS];
1650 struct dquot * const *dquots = inode->i_dquot; 1655 struct dquot * const *dquots = i_dquot(inode);
1651 1656
1652 if (!dquot_active(inode)) 1657 if (!dquot_active(inode))
1653 return 0; 1658 return 0;
@@ -1696,14 +1701,14 @@ int dquot_claim_space_nodirty(struct inode *inode, qsize_t number)
1696 spin_lock(&dq_data_lock); 1701 spin_lock(&dq_data_lock);
1697 /* Claim reserved quotas to allocated quotas */ 1702 /* Claim reserved quotas to allocated quotas */
1698 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { 1703 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1699 if (inode->i_dquot[cnt]) 1704 if (i_dquot(inode)[cnt])
1700 dquot_claim_reserved_space(inode->i_dquot[cnt], 1705 dquot_claim_reserved_space(i_dquot(inode)[cnt],
1701 number); 1706 number);
1702 } 1707 }
1703 /* Update inode bytes */ 1708 /* Update inode bytes */
1704 inode_claim_rsv_space(inode, number); 1709 inode_claim_rsv_space(inode, number);
1705 spin_unlock(&dq_data_lock); 1710 spin_unlock(&dq_data_lock);
1706 mark_all_dquot_dirty(inode->i_dquot); 1711 mark_all_dquot_dirty(i_dquot(inode));
1707 srcu_read_unlock(&dquot_srcu, index); 1712 srcu_read_unlock(&dquot_srcu, index);
1708 return 0; 1713 return 0;
1709} 1714}
@@ -1725,14 +1730,14 @@ void dquot_reclaim_space_nodirty(struct inode *inode, qsize_t number)
1725 spin_lock(&dq_data_lock); 1730 spin_lock(&dq_data_lock);
1726 /* Claim reserved quotas to allocated quotas */ 1731 /* Claim reserved quotas to allocated quotas */
1727 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { 1732 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1728 if (inode->i_dquot[cnt]) 1733 if (i_dquot(inode)[cnt])
1729 dquot_reclaim_reserved_space(inode->i_dquot[cnt], 1734 dquot_reclaim_reserved_space(i_dquot(inode)[cnt],
1730 number); 1735 number);
1731 } 1736 }
1732 /* Update inode bytes */ 1737 /* Update inode bytes */
1733 inode_reclaim_rsv_space(inode, number); 1738 inode_reclaim_rsv_space(inode, number);
1734 spin_unlock(&dq_data_lock); 1739 spin_unlock(&dq_data_lock);
1735 mark_all_dquot_dirty(inode->i_dquot); 1740 mark_all_dquot_dirty(i_dquot(inode));
1736 srcu_read_unlock(&dquot_srcu, index); 1741 srcu_read_unlock(&dquot_srcu, index);
1737 return; 1742 return;
1738} 1743}
@@ -1745,7 +1750,7 @@ void __dquot_free_space(struct inode *inode, qsize_t number, int flags)
1745{ 1750{
1746 unsigned int cnt; 1751 unsigned int cnt;
1747 struct dquot_warn warn[MAXQUOTAS]; 1752 struct dquot_warn warn[MAXQUOTAS];
1748 struct dquot **dquots = inode->i_dquot; 1753 struct dquot **dquots = i_dquot(inode);
1749 int reserve = flags & DQUOT_SPACE_RESERVE, index; 1754 int reserve = flags & DQUOT_SPACE_RESERVE, index;
1750 1755
1751 if (!dquot_active(inode)) { 1756 if (!dquot_active(inode)) {
@@ -1784,11 +1789,11 @@ EXPORT_SYMBOL(__dquot_free_space);
1784/* 1789/*
1785 * This operation can block, but only after everything is updated 1790 * This operation can block, but only after everything is updated
1786 */ 1791 */
1787void dquot_free_inode(const struct inode *inode) 1792void dquot_free_inode(struct inode *inode)
1788{ 1793{
1789 unsigned int cnt; 1794 unsigned int cnt;
1790 struct dquot_warn warn[MAXQUOTAS]; 1795 struct dquot_warn warn[MAXQUOTAS];
1791 struct dquot * const *dquots = inode->i_dquot; 1796 struct dquot * const *dquots = i_dquot(inode);
1792 int index; 1797 int index;
1793 1798
1794 if (!dquot_active(inode)) 1799 if (!dquot_active(inode))
@@ -1865,7 +1870,7 @@ int __dquot_transfer(struct inode *inode, struct dquot **transfer_to)
1865 if (!sb_has_quota_active(inode->i_sb, cnt)) 1870 if (!sb_has_quota_active(inode->i_sb, cnt))
1866 continue; 1871 continue;
1867 is_valid[cnt] = 1; 1872 is_valid[cnt] = 1;
1868 transfer_from[cnt] = inode->i_dquot[cnt]; 1873 transfer_from[cnt] = i_dquot(inode)[cnt];
1869 ret = check_idq(transfer_to[cnt], 1, &warn_to[cnt]); 1874 ret = check_idq(transfer_to[cnt], 1, &warn_to[cnt]);
1870 if (ret) 1875 if (ret)
1871 goto over_quota; 1876 goto over_quota;
@@ -1901,7 +1906,7 @@ int __dquot_transfer(struct inode *inode, struct dquot **transfer_to)
1901 dquot_incr_space(transfer_to[cnt], cur_space); 1906 dquot_incr_space(transfer_to[cnt], cur_space);
1902 dquot_resv_space(transfer_to[cnt], rsv_space); 1907 dquot_resv_space(transfer_to[cnt], rsv_space);
1903 1908
1904 inode->i_dquot[cnt] = transfer_to[cnt]; 1909 i_dquot(inode)[cnt] = transfer_to[cnt];
1905 } 1910 }
1906 spin_unlock(&dq_data_lock); 1911 spin_unlock(&dq_data_lock);
1907 1912
@@ -2743,8 +2748,8 @@ static int __init dquot_init(void)
2743 for (i = 0; i < nr_hash; i++) 2748 for (i = 0; i < nr_hash; i++)
2744 INIT_HLIST_HEAD(dquot_hash + i); 2749 INIT_HLIST_HEAD(dquot_hash + i);
2745 2750
2746 printk("Dquot-cache hash table entries: %ld (order %ld, %ld bytes)\n", 2751 pr_info("VFS: Dquot-cache hash table entries: %ld (order %ld,"
2747 nr_hash, order, (PAGE_SIZE << order)); 2752 " %ld bytes)\n", nr_hash, order, (PAGE_SIZE << order));
2748 2753
2749 register_shrinker(&dqcache_shrinker); 2754 register_shrinker(&dqcache_shrinker);
2750 2755
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index 75621649dbd7..2aa4151f99d2 100644
--- a/fs/quota/quota.c
+++ b/fs/quota/quota.c
@@ -47,8 +47,11 @@ static int check_quotactl_permission(struct super_block *sb, int type, int cmd,
47 47
48static void quota_sync_one(struct super_block *sb, void *arg) 48static void quota_sync_one(struct super_block *sb, void *arg)
49{ 49{
50 if (sb->s_qcop && sb->s_qcop->quota_sync) 50 int type = *(int *)arg;
51 sb->s_qcop->quota_sync(sb, *(int *)arg); 51
52 if (sb->s_qcop && sb->s_qcop->quota_sync &&
53 (sb->s_quota_types & (1 << type)))
54 sb->s_qcop->quota_sync(sb, type);
52} 55}
53 56
54static int quota_sync_all(int type) 57static int quota_sync_all(int type)
@@ -297,8 +300,14 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id,
297 300
298 if (type >= (XQM_COMMAND(cmd) ? XQM_MAXQUOTAS : MAXQUOTAS)) 301 if (type >= (XQM_COMMAND(cmd) ? XQM_MAXQUOTAS : MAXQUOTAS))
299 return -EINVAL; 302 return -EINVAL;
303 /*
304 * Quota not supported on this fs? Check this before s_quota_types
305 * since they needn't be set if quota is not supported at all.
306 */
300 if (!sb->s_qcop) 307 if (!sb->s_qcop)
301 return -ENOSYS; 308 return -ENOSYS;
309 if (!(sb->s_quota_types & (1 << type)))
310 return -EINVAL;
302 311
303 ret = check_quotactl_permission(sb, type, cmd, id); 312 ret = check_quotactl_permission(sb, type, cmd, id);
304 if (ret < 0) 313 if (ret < 0)
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 /*
diff --git a/fs/udf/super.c b/fs/udf/super.c
index e229315bbf7a..3ccb2f11fc76 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -2082,12 +2082,12 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
2082 mutex_init(&sbi->s_alloc_mutex); 2082 mutex_init(&sbi->s_alloc_mutex);
2083 2083
2084 if (!udf_parse_options((char *)options, &uopt, false)) 2084 if (!udf_parse_options((char *)options, &uopt, false))
2085 goto error_out; 2085 goto parse_options_failure;
2086 2086
2087 if (uopt.flags & (1 << UDF_FLAG_UTF8) && 2087 if (uopt.flags & (1 << UDF_FLAG_UTF8) &&
2088 uopt.flags & (1 << UDF_FLAG_NLS_MAP)) { 2088 uopt.flags & (1 << UDF_FLAG_NLS_MAP)) {
2089 udf_err(sb, "utf8 cannot be combined with iocharset\n"); 2089 udf_err(sb, "utf8 cannot be combined with iocharset\n");
2090 goto error_out; 2090 goto parse_options_failure;
2091 } 2091 }
2092#ifdef CONFIG_UDF_NLS 2092#ifdef CONFIG_UDF_NLS
2093 if ((uopt.flags & (1 << UDF_FLAG_NLS_MAP)) && !uopt.nls_map) { 2093 if ((uopt.flags & (1 << UDF_FLAG_NLS_MAP)) && !uopt.nls_map) {
@@ -2237,8 +2237,8 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
2237 return 0; 2237 return 0;
2238 2238
2239error_out: 2239error_out:
2240 if (sbi->s_vat_inode) 2240 iput(sbi->s_vat_inode);
2241 iput(sbi->s_vat_inode); 2241parse_options_failure:
2242#ifdef CONFIG_UDF_NLS 2242#ifdef CONFIG_UDF_NLS
2243 if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP)) 2243 if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP))
2244 unload_nls(sbi->s_nls_map); 2244 unload_nls(sbi->s_nls_map);
@@ -2291,8 +2291,7 @@ static void udf_put_super(struct super_block *sb)
2291 2291
2292 sbi = UDF_SB(sb); 2292 sbi = UDF_SB(sb);
2293 2293
2294 if (sbi->s_vat_inode) 2294 iput(sbi->s_vat_inode);
2295 iput(sbi->s_vat_inode);
2296#ifdef CONFIG_UDF_NLS 2295#ifdef CONFIG_UDF_NLS
2297 if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP)) 2296 if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP))
2298 unload_nls(sbi->s_nls_map); 2297 unload_nls(sbi->s_nls_map);
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 9f622feda6a4..206b97fd1d8a 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1425,6 +1425,7 @@ xfs_fs_fill_super(
1425 sb->s_export_op = &xfs_export_operations; 1425 sb->s_export_op = &xfs_export_operations;
1426#ifdef CONFIG_XFS_QUOTA 1426#ifdef CONFIG_XFS_QUOTA
1427 sb->s_qcop = &xfs_quotactl_operations; 1427 sb->s_qcop = &xfs_quotactl_operations;
1428 sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP | QTYPE_MASK_PRJ;
1428#endif 1429#endif
1429 sb->s_op = &xfs_super_operations; 1430 sb->s_op = &xfs_super_operations;
1430 1431
diff --git a/include/linux/fs.h b/include/linux/fs.h
index b4a1d73c0d5d..f21b15804917 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -606,9 +606,6 @@ struct inode {
606 const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ 606 const struct file_operations *i_fop; /* former ->i_op->default_file_ops */
607 struct file_lock *i_flock; 607 struct file_lock *i_flock;
608 struct address_space i_data; 608 struct address_space i_data;
609#ifdef CONFIG_QUOTA
610 struct dquot *i_dquot[MAXQUOTAS];
611#endif
612 struct list_head i_devices; 609 struct list_head i_devices;
613 union { 610 union {
614 struct pipe_inode_info *i_pipe; 611 struct pipe_inode_info *i_pipe;
@@ -1224,6 +1221,7 @@ struct super_block {
1224 struct backing_dev_info *s_bdi; 1221 struct backing_dev_info *s_bdi;
1225 struct mtd_info *s_mtd; 1222 struct mtd_info *s_mtd;
1226 struct hlist_node s_instances; 1223 struct hlist_node s_instances;
1224 unsigned int s_quota_types; /* Bitmask of supported quota types */
1227 struct quota_info s_dquot; /* Diskquota specific options */ 1225 struct quota_info s_dquot; /* Diskquota specific options */
1228 1226
1229 struct sb_writers s_writers; 1227 struct sb_writers s_writers;
@@ -1592,6 +1590,7 @@ struct super_operations {
1592#ifdef CONFIG_QUOTA 1590#ifdef CONFIG_QUOTA
1593 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); 1591 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
1594 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); 1592 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
1593 struct dquot **(*get_dquots)(struct inode *);
1595#endif 1594#endif
1596 int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t); 1595 int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
1597 long (*nr_cached_objects)(struct super_block *, int); 1596 long (*nr_cached_objects)(struct super_block *, int);
diff --git a/include/linux/quota.h b/include/linux/quota.h
index 80d345a3524c..50978b781a19 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -56,6 +56,11 @@ enum quota_type {
56 PRJQUOTA = 2, /* element used for project quotas */ 56 PRJQUOTA = 2, /* element used for project quotas */
57}; 57};
58 58
59/* Masks for quota types when used as a bitmask */
60#define QTYPE_MASK_USR (1 << USRQUOTA)
61#define QTYPE_MASK_GRP (1 << GRPQUOTA)
62#define QTYPE_MASK_PRJ (1 << PRJQUOTA)
63
59typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */ 64typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */
60typedef long long qsize_t; /* Type in which we store sizes */ 65typedef long long qsize_t; /* Type in which we store sizes */
61 66
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index 1d3eee594cd6..f23538a6e411 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -64,10 +64,10 @@ void dquot_destroy(struct dquot *dquot);
64int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags); 64int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags);
65void __dquot_free_space(struct inode *inode, qsize_t number, int flags); 65void __dquot_free_space(struct inode *inode, qsize_t number, int flags);
66 66
67int dquot_alloc_inode(const struct inode *inode); 67int dquot_alloc_inode(struct inode *inode);
68 68
69int dquot_claim_space_nodirty(struct inode *inode, qsize_t number); 69int dquot_claim_space_nodirty(struct inode *inode, qsize_t number);
70void dquot_free_inode(const struct inode *inode); 70void dquot_free_inode(struct inode *inode);
71void dquot_reclaim_space_nodirty(struct inode *inode, qsize_t number); 71void dquot_reclaim_space_nodirty(struct inode *inode, qsize_t number);
72 72
73int dquot_disable(struct super_block *sb, int type, unsigned int flags); 73int dquot_disable(struct super_block *sb, int type, unsigned int flags);
@@ -213,12 +213,12 @@ static inline void dquot_drop(struct inode *inode)
213{ 213{
214} 214}
215 215
216static inline int dquot_alloc_inode(const struct inode *inode) 216static inline int dquot_alloc_inode(struct inode *inode)
217{ 217{
218 return 0; 218 return 0;
219} 219}
220 220
221static inline void dquot_free_inode(const struct inode *inode) 221static inline void dquot_free_inode(struct inode *inode)
222{ 222{
223} 223}
224 224