aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-03-03 09:05:01 -0500
committerJan Kara <jack@suse.cz>2010-03-04 18:20:28 -0500
commit63936ddaa16b9486e2d426ed7b09f559a5c60f87 (patch)
tree4cb1c4581799e10c26dd71d1a7d420de3c2cfd05 /fs/reiserfs
parent5dd4056db84387975140ff2568eaa0406f07985e (diff)
dquot: cleanup inode allocation / freeing routines
Get rid of the alloc_inode and free_inode dquot operations - they are always called from the filesystem and if a filesystem really needs their own (which none currently does) it can just call into it's own routine directly. Also get rid of the vfs_dq_alloc/vfs_dq_free wrappers and always call the lowlevel dquot_alloc_inode / dqout_free_inode routines directly, which now lose the number argument which is always 1. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r--fs/reiserfs/inode.c10
-rw-r--r--fs/reiserfs/super.c2
2 files changed, 5 insertions, 7 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 2df0f5c7c60b..f56a3d2e6497 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -54,7 +54,7 @@ void reiserfs_delete_inode(struct inode *inode)
54 * after delete_object so that quota updates go into the same transaction as 54 * after delete_object so that quota updates go into the same transaction as
55 * stat data deletion */ 55 * stat data deletion */
56 if (!err) 56 if (!err)
57 vfs_dq_free_inode(inode); 57 dquot_free_inode(inode);
58 58
59 if (journal_end(&th, inode->i_sb, jbegin_count)) 59 if (journal_end(&th, inode->i_sb, jbegin_count))
60 goto out; 60 goto out;
@@ -1765,10 +1765,10 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
1765 1765
1766 BUG_ON(!th->t_trans_id); 1766 BUG_ON(!th->t_trans_id);
1767 1767
1768 if (vfs_dq_alloc_inode(inode)) { 1768 vfs_dq_init(inode);
1769 err = -EDQUOT; 1769 err = dquot_alloc_inode(inode);
1770 if (err)
1770 goto out_end_trans; 1771 goto out_end_trans;
1771 }
1772 if (!dir->i_nlink) { 1772 if (!dir->i_nlink) {
1773 err = -EPERM; 1773 err = -EPERM;
1774 goto out_bad_inode; 1774 goto out_bad_inode;
@@ -1959,7 +1959,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
1959 INODE_PKEY(inode)->k_objectid = 0; 1959 INODE_PKEY(inode)->k_objectid = 0;
1960 1960
1961 /* Quota change must be inside a transaction for journaling */ 1961 /* Quota change must be inside a transaction for journaling */
1962 vfs_dq_free_inode(inode); 1962 dquot_free_inode(inode);
1963 1963
1964 out_end_trans: 1964 out_end_trans:
1965 journal_end(th, th->t_super, th->t_blocks_allocated); 1965 journal_end(th, th->t_super, th->t_blocks_allocated);
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index ea4a77e9d7f5..e942ceecf2b8 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -618,8 +618,6 @@ static int reiserfs_quota_on(struct super_block *, int, int, char *, int);
618static const struct dquot_operations reiserfs_quota_operations = { 618static const struct dquot_operations reiserfs_quota_operations = {
619 .initialize = dquot_initialize, 619 .initialize = dquot_initialize,
620 .drop = dquot_drop, 620 .drop = dquot_drop,
621 .alloc_inode = dquot_alloc_inode,
622 .free_inode = dquot_free_inode,
623 .transfer = dquot_transfer, 621 .transfer = dquot_transfer,
624 .write_dquot = reiserfs_write_dquot, 622 .write_dquot = reiserfs_write_dquot,
625 .acquire_dquot = reiserfs_acquire_dquot, 623 .acquire_dquot = reiserfs_acquire_dquot,