aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-01-12 13:05:26 -0500
committerJan Kara <jack@suse.cz>2009-03-25 21:18:34 -0400
commitedf7245362f7b8b8c76c4a6cad3604bf80884848 (patch)
treee5a78aeac197c945e1ef6c1321b3ec5dd78378e7 /fs/ext4
parenta219ce3748bbc596cec85c44754b3f6b994f1e1d (diff)
ext4: Remove unnecessary quota functions
ext4_dquot_initialize() and ext4_dquot_drop() is no longer needed because of modified quota locking. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/super.c44
1 files changed, 2 insertions, 42 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 39d1993cfa13..41f879497f91 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -926,8 +926,6 @@ static int bdev_try_to_free_page(struct super_block *sb, struct page *page, gfp_
926#define QTYPE2NAME(t) ((t) == USRQUOTA ? "user" : "group") 926#define QTYPE2NAME(t) ((t) == USRQUOTA ? "user" : "group")
927#define QTYPE2MOPT(on, t) ((t) == USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA)) 927#define QTYPE2MOPT(on, t) ((t) == USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA))
928 928
929static int ext4_dquot_initialize(struct inode *inode, int type);
930static int ext4_dquot_drop(struct inode *inode);
931static int ext4_write_dquot(struct dquot *dquot); 929static int ext4_write_dquot(struct dquot *dquot);
932static int ext4_acquire_dquot(struct dquot *dquot); 930static int ext4_acquire_dquot(struct dquot *dquot);
933static int ext4_release_dquot(struct dquot *dquot); 931static int ext4_release_dquot(struct dquot *dquot);
@@ -942,8 +940,8 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type,
942 const char *data, size_t len, loff_t off); 940 const char *data, size_t len, loff_t off);
943 941
944static struct dquot_operations ext4_quota_operations = { 942static struct dquot_operations ext4_quota_operations = {
945 .initialize = ext4_dquot_initialize, 943 .initialize = dquot_initialize,
946 .drop = ext4_dquot_drop, 944 .drop = dquot_drop,
947 .alloc_space = dquot_alloc_space, 945 .alloc_space = dquot_alloc_space,
948 .alloc_inode = dquot_alloc_inode, 946 .alloc_inode = dquot_alloc_inode,
949 .free_space = dquot_free_space, 947 .free_space = dquot_free_space,
@@ -3380,44 +3378,6 @@ static inline struct inode *dquot_to_inode(struct dquot *dquot)
3380 return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; 3378 return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
3381} 3379}
3382 3380
3383static int ext4_dquot_initialize(struct inode *inode, int type)
3384{
3385 handle_t *handle;
3386 int ret, err;
3387
3388 /* We may create quota structure so we need to reserve enough blocks */
3389 handle = ext4_journal_start(inode, 2*EXT4_QUOTA_INIT_BLOCKS(inode->i_sb));
3390 if (IS_ERR(handle))
3391 return PTR_ERR(handle);
3392 ret = dquot_initialize(inode, type);
3393 err = ext4_journal_stop(handle);
3394 if (!ret)
3395 ret = err;
3396 return ret;
3397}
3398
3399static int ext4_dquot_drop(struct inode *inode)
3400{
3401 handle_t *handle;
3402 int ret, err;
3403
3404 /* We may delete quota structure so we need to reserve enough blocks */
3405 handle = ext4_journal_start(inode, 2*EXT4_QUOTA_DEL_BLOCKS(inode->i_sb));
3406 if (IS_ERR(handle)) {
3407 /*
3408 * We call dquot_drop() anyway to at least release references
3409 * to quota structures so that umount does not hang.
3410 */
3411 dquot_drop(inode);
3412 return PTR_ERR(handle);
3413 }
3414 ret = dquot_drop(inode);
3415 err = ext4_journal_stop(handle);
3416 if (!ret)
3417 ret = err;
3418 return ret;
3419}
3420
3421static int ext4_write_dquot(struct dquot *dquot) 3381static int ext4_write_dquot(struct dquot *dquot)
3422{ 3382{
3423 int ret, err; 3383 int ret, err;