Commit 1805f2ca authored by Liu Bo's avatar Liu Bo Committed by David Sterba

Btrfs: remove redundant btrfs_balance_delayed_items

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().
Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Reviewed-by: default avatarLu Fengqi <lufq.fnst@cn.fujitsu.com>
Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 0c5b9b5d
...@@ -6560,7 +6560,6 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry, ...@@ -6560,7 +6560,6 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry,
out_unlock: out_unlock:
btrfs_end_transaction(trans); btrfs_end_transaction(trans);
btrfs_balance_delayed_items(fs_info);
btrfs_btree_balance_dirty(fs_info); btrfs_btree_balance_dirty(fs_info);
if (drop_inode) { if (drop_inode) {
inode_dec_link_count(inode); inode_dec_link_count(inode);
...@@ -6641,7 +6640,6 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry, ...@@ -6641,7 +6640,6 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry,
inode_dec_link_count(inode); inode_dec_link_count(inode);
iput(inode); iput(inode);
} }
btrfs_balance_delayed_items(fs_info);
btrfs_btree_balance_dirty(fs_info); btrfs_btree_balance_dirty(fs_info);
return err; return err;
...@@ -6716,7 +6714,6 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir, ...@@ -6716,7 +6714,6 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir,
btrfs_log_new_name(trans, BTRFS_I(inode), NULL, parent); btrfs_log_new_name(trans, BTRFS_I(inode), NULL, parent);
} }
btrfs_balance_delayed_items(fs_info);
fail: fail:
if (trans) if (trans)
btrfs_end_transaction(trans); btrfs_end_transaction(trans);
...@@ -6794,7 +6791,6 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) ...@@ -6794,7 +6791,6 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
inode_dec_link_count(inode); inode_dec_link_count(inode);
iput(inode); iput(inode);
} }
btrfs_balance_delayed_items(fs_info);
btrfs_btree_balance_dirty(fs_info); btrfs_btree_balance_dirty(fs_info);
return err; return err;
...@@ -10688,7 +10684,6 @@ static int btrfs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) ...@@ -10688,7 +10684,6 @@ static int btrfs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
btrfs_end_transaction(trans); btrfs_end_transaction(trans);
if (ret) if (ret)
iput(inode); iput(inode);
btrfs_balance_delayed_items(fs_info);
btrfs_btree_balance_dirty(fs_info); btrfs_btree_balance_dirty(fs_info);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment