diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-03-03 09:05:01 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2010-03-04 18:20:28 -0500 |
commit | 63936ddaa16b9486e2d426ed7b09f559a5c60f87 (patch) | |
tree | 4cb1c4581799e10c26dd71d1a7d420de3c2cfd05 /fs/reiserfs/inode.c | |
parent | 5dd4056db84387975140ff2568eaa0406f07985e (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/inode.c')
-rw-r--r-- | fs/reiserfs/inode.c | 10 |
1 files changed, 5 insertions, 5 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); |