From: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
To: Liu Bo <bo.li.liu@oracle.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: remove redundant btrfs_balance_delayed_items
Date: Sat, 21 Oct 2017 14:16:05 +0800 [thread overview]
Message-ID: <20171021061605.GA13657@fnst.localdomain> (raw)
In-Reply-To: <20171020235341.17019-1-bo.li.liu@oracle.com>
On Fri, Oct 20, 2017 at 05:53:41PM -0600, Liu Bo wrote:
>In functions like btrfs_create(), we run both
>btrfs_balance_delayed_items() and btrfs_btree_balance_dirty() after
>the operation, but btrfs_btree_balance_dirty() is surely going to run
>btrfs_balance_delayed_items().
>
>This keeps only btrfs_btree_balance_dirty().
Reviewed-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
--
Thanks,
Lu
>
>Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
>---
> fs/btrfs/inode.c | 5 -----
> 1 file changed, 5 deletions(-)
>
>diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
>index 1bd9f01..da57b03 100644
>--- a/fs/btrfs/inode.c
>+++ b/fs/btrfs/inode.c
>@@ -6599,7 +6599,6 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry,
>
> out_unlock:
> btrfs_end_transaction(trans);
>- btrfs_balance_delayed_items(fs_info);
> btrfs_btree_balance_dirty(fs_info);
> if (drop_inode) {
> inode_dec_link_count(inode);
>@@ -6680,7 +6679,6 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry,
> inode_dec_link_count(inode);
> iput(inode);
> }
>- btrfs_balance_delayed_items(fs_info);
> btrfs_btree_balance_dirty(fs_info);
> return err;
>
>@@ -6755,7 +6753,6 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir,
> btrfs_log_new_name(trans, BTRFS_I(inode), NULL, parent);
> }
>
>- btrfs_balance_delayed_items(fs_info);
> fail:
> if (trans)
> btrfs_end_transaction(trans);
>@@ -6833,7 +6830,6 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
> inode_dec_link_count(inode);
> iput(inode);
> }
>- btrfs_balance_delayed_items(fs_info);
> btrfs_btree_balance_dirty(fs_info);
> return err;
>
>@@ -10757,7 +10753,6 @@ static int btrfs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
> btrfs_end_transaction(trans);
> if (ret)
> iput(inode);
>- btrfs_balance_delayed_items(fs_info);
> btrfs_btree_balance_dirty(fs_info);
> return ret;
>
>--
>2.9.4
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-btrfs" 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:[~2017-10-21 6:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-20 23:53 [PATCH] Btrfs: remove redundant btrfs_balance_delayed_items Liu Bo
2017-10-21 6:16 ` Lu Fengqi [this message]
2017-10-21 6:25 ` Nikolay Borisov
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=20171021061605.GA13657@fnst.localdomain \
--to=lufq.fnst@cn.fujitsu.com \
--cc=bo.li.liu@oracle.com \
--cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).