From: Nikolay Borisov <nborisov@suse.com>
To: Liu Bo <bo.li.liu@oracle.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: remove redundant btrfs_balance_delayed_items
Date: Sat, 21 Oct 2017 09:25:04 +0300 [thread overview]
Message-ID: <91b9ee85-d8f9-2704-26ef-0e610b44634c@suse.com> (raw)
In-Reply-To: <20171020235341.17019-1-bo.li.liu@oracle.com>
On 21.10.2017 02:53, 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: Nikolay Borisov <nborisov@suse.com>
>
> 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;
>
>
prev parent reply other threads:[~2017-10-21 6:25 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
2017-10-21 6:25 ` Nikolay Borisov [this message]
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=91b9ee85-d8f9-2704-26ef-0e610b44634c@suse.com \
--to=nborisov@suse.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).