aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-01-12 13:03:19 -0500
committerJan Kara <jack@suse.cz>2009-03-25 21:18:34 -0400
commita219ce3748bbc596cec85c44754b3f6b994f1e1d (patch)
tree58fb672ba4ae804500327e863b83bb9491b98b95
parent08d0350ce9d63b19b62498c7b6421c2a95246b95 (diff)
ext3: Remove unnecessary quota functions
ext3_dquot_initialize() and ext3_dquot_drop() is no longer needed because of modified quota locking. Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r--fs/ext3/super.c44
1 files changed, 2 insertions, 42 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 4a970411a458..41e6ae605e0b 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -707,8 +707,6 @@ static int bdev_try_to_free_page(struct super_block *sb, struct page *page,
707#define QTYPE2NAME(t) ((t)==USRQUOTA?"user":"group") 707#define QTYPE2NAME(t) ((t)==USRQUOTA?"user":"group")
708#define QTYPE2MOPT(on, t) ((t)==USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA)) 708#define QTYPE2MOPT(on, t) ((t)==USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA))
709 709
710static int ext3_dquot_initialize(struct inode *inode, int type);
711static int ext3_dquot_drop(struct inode *inode);
712static int ext3_write_dquot(struct dquot *dquot); 710static int ext3_write_dquot(struct dquot *dquot);
713static int ext3_acquire_dquot(struct dquot *dquot); 711static int ext3_acquire_dquot(struct dquot *dquot);
714static int ext3_release_dquot(struct dquot *dquot); 712static int ext3_release_dquot(struct dquot *dquot);
@@ -723,8 +721,8 @@ static ssize_t ext3_quota_write(struct super_block *sb, int type,
723 const char *data, size_t len, loff_t off); 721 const char *data, size_t len, loff_t off);
724 722
725static struct dquot_operations ext3_quota_operations = { 723static struct dquot_operations ext3_quota_operations = {
726 .initialize = ext3_dquot_initialize, 724 .initialize = dquot_initialize,
727 .drop = ext3_dquot_drop, 725 .drop = dquot_drop,
728 .alloc_space = dquot_alloc_space, 726 .alloc_space = dquot_alloc_space,
729 .alloc_inode = dquot_alloc_inode, 727 .alloc_inode = dquot_alloc_inode,
730 .free_space = dquot_free_space, 728 .free_space = dquot_free_space,
@@ -2714,44 +2712,6 @@ static inline struct inode *dquot_to_inode(struct dquot *dquot)
2714 return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]; 2712 return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
2715} 2713}
2716 2714
2717static int ext3_dquot_initialize(struct inode *inode, int type)
2718{
2719 handle_t *handle;
2720 int ret, err;
2721
2722 /* We may create quota structure so we need to reserve enough blocks */
2723 handle = ext3_journal_start(inode, 2*EXT3_QUOTA_INIT_BLOCKS(inode->i_sb));
2724 if (IS_ERR(handle))
2725 return PTR_ERR(handle);
2726 ret = dquot_initialize(inode, type);
2727 err = ext3_journal_stop(handle);
2728 if (!ret)
2729 ret = err;
2730 return ret;
2731}
2732
2733static int ext3_dquot_drop(struct inode *inode)
2734{
2735 handle_t *handle;
2736 int ret, err;
2737
2738 /* We may delete quota structure so we need to reserve enough blocks */
2739 handle = ext3_journal_start(inode, 2*EXT3_QUOTA_DEL_BLOCKS(inode->i_sb));
2740 if (IS_ERR(handle)) {
2741 /*
2742 * We call dquot_drop() anyway to at least release references
2743 * to quota structures so that umount does not hang.
2744 */
2745 dquot_drop(inode);
2746 return PTR_ERR(handle);
2747 }
2748 ret = dquot_drop(inode);
2749 err = ext3_journal_stop(handle);
2750 if (!ret)
2751 ret = err;
2752 return ret;
2753}
2754
2755static int ext3_write_dquot(struct dquot *dquot) 2715static int ext3_write_dquot(struct dquot *dquot)
2756{ 2716{
2757 int ret, err; 2717 int ret, err;