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.f...@cn.fujitsu.com>

-- 
Thanks,
Lu

>
>Signed-off-by: Liu Bo <bo.li....@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 majord...@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to