|
@@ -5795,6 +5795,7 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry,
|
|
|
}
|
|
|
out_unlock:
|
|
|
btrfs_end_transaction(trans, root);
|
|
|
+ btrfs_balance_delayed_items(root);
|
|
|
btrfs_btree_balance_dirty(root);
|
|
|
if (drop_inode) {
|
|
|
inode_dec_link_count(inode);
|
|
@@ -5868,6 +5869,7 @@ out_unlock:
|
|
|
inode_dec_link_count(inode);
|
|
|
iput(inode);
|
|
|
}
|
|
|
+ btrfs_balance_delayed_items(root);
|
|
|
btrfs_btree_balance_dirty(root);
|
|
|
return err;
|
|
|
}
|
|
@@ -5926,6 +5928,7 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir,
|
|
|
}
|
|
|
|
|
|
btrfs_end_transaction(trans, root);
|
|
|
+ btrfs_balance_delayed_items(root);
|
|
|
fail:
|
|
|
if (drop_inode) {
|
|
|
inode_dec_link_count(inode);
|
|
@@ -5992,6 +5995,7 @@ out_fail:
|
|
|
btrfs_end_transaction(trans, root);
|
|
|
if (drop_on_err)
|
|
|
iput(inode);
|
|
|
+ btrfs_balance_delayed_items(root);
|
|
|
btrfs_btree_balance_dirty(root);
|
|
|
return err;
|
|
|
}
|