From: Mingming Cao <cmm@us.ibm.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 10/11] ext4: Remove unnecessary quota functions
Date: Tue, 20 Jan 2009 13:41:54 -0800 [thread overview]
Message-ID: <1232487714.6464.15.camel@mingming-laptop> (raw)
In-Reply-To: <1232129299-22018-11-git-send-email-jack@suse.cz>
在 2009-01-16五的 19:08 +0100,Jan Kara写道:
> ext4_dquot_initialize() and ext4_dquot_drop() is no longer
> needed because of modified quota locking.
>
> Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed_by: Mingming Cao <cmm@us.ibm.com>
> ---
> fs/ext4/super.c | 44 ++------------------------------------------
> 1 files changed, 2 insertions(+), 42 deletions(-)
>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index e5f06a5..f0785fd 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_
> #define QTYPE2NAME(t) ((t) == USRQUOTA ? "user" : "group")
> #define QTYPE2MOPT(on, t) ((t) == USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA))
>
> -static int ext4_dquot_initialize(struct inode *inode, int type);
> -static int ext4_dquot_drop(struct inode *inode);
> static int ext4_write_dquot(struct dquot *dquot);
> static int ext4_acquire_dquot(struct dquot *dquot);
> static int ext4_release_dquot(struct dquot *dquot);
> @@ -942,8 +940,8 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type,
> const char *data, size_t len, loff_t off);
>
> static struct dquot_operations ext4_quota_operations = {
> - .initialize = ext4_dquot_initialize,
> - .drop = ext4_dquot_drop,
> + .initialize = dquot_initialize,
> + .drop = dquot_drop,
> .alloc_space = dquot_alloc_space,
> .alloc_inode = dquot_alloc_inode,
> .free_space = dquot_free_space,
> @@ -3378,44 +3376,6 @@ static inline struct inode *dquot_to_inode(struct dquot *dquot)
> return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
> }
>
> -static int ext4_dquot_initialize(struct inode *inode, int type)
> -{
> - handle_t *handle;
> - int ret, err;
> -
> - /* We may create quota structure so we need to reserve enough blocks */
> - handle = ext4_journal_start(inode, 2*EXT4_QUOTA_INIT_BLOCKS(inode->i_sb));
> - if (IS_ERR(handle))
> - return PTR_ERR(handle);
> - ret = dquot_initialize(inode, type);
> - err = ext4_journal_stop(handle);
> - if (!ret)
> - ret = err;
> - return ret;
> -}
> -
> -static int ext4_dquot_drop(struct inode *inode)
> -{
> - handle_t *handle;
> - int ret, err;
> -
> - /* We may delete quota structure so we need to reserve enough blocks */
> - handle = ext4_journal_start(inode, 2*EXT4_QUOTA_DEL_BLOCKS(inode->i_sb));
> - if (IS_ERR(handle)) {
> - /*
> - * We call dquot_drop() anyway to at least release references
> - * to quota structures so that umount does not hang.
> - */
> - dquot_drop(inode);
> - return PTR_ERR(handle);
> - }
> - ret = dquot_drop(inode);
> - err = ext4_journal_stop(handle);
> - if (!ret)
> - ret = err;
> - return ret;
> -}
> -
> static int ext4_write_dquot(struct dquot *dquot)
> {
> int ret, err;
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-01-20 21:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <yes>
2009-01-16 18:08 ` Quota fixes and improvements Jan Kara
2009-01-16 18:08 ` [PATCH 01/11] quota: Improve locking Jan Kara
2009-01-16 18:08 ` [PATCH 02/11] ocfs2: Remove ocfs2_dquot_initialize() and ocfs2_dquot_drop() Jan Kara
2009-01-16 18:08 ` [PATCH 03/11] ocfs2: Push out dropping of dentry lock to ocfs2_wq Jan Kara
2009-01-16 18:08 ` [PATCH 04/11] ocfs2: Fix possible deadlock in ocfs2_write_dquot() Jan Kara
2009-01-16 18:08 ` [PATCH 05/11] quota: Add quota reservation support Jan Kara
2009-01-16 18:08 ` [PATCH 06/11] quota: Add quota reservation claim and released operations Jan Kara
2009-01-16 18:08 ` [PATCH 07/11] quota: Use inode->i_blkbits to get block bits Jan Kara
2009-01-16 18:08 ` [PATCH 08/11] quota: Move EXPORT_SYMBOL immediately next to the functions/varibles Jan Kara
2009-01-16 18:08 ` [PATCH 09/11] ext3: Remove unnecessary quota functions Jan Kara
2009-01-16 18:08 ` [PATCH 10/11] ext4: " Jan Kara
2009-01-16 18:08 ` [PATCH 11/11] reiserfs: " Jan Kara
2009-01-20 21:41 ` Mingming Cao [this message]
2009-01-20 21:41 ` [PATCH 09/11] ext3: " Mingming Cao
2009-01-24 7:49 ` [PATCH 01/11] quota: Improve locking Andrew Morton
2009-01-26 10:04 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1232487714.6464.15.camel@mingming-laptop \
--to=cmm@us.ibm.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox