diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/inode.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 9d0eaa57d4ee..f60e2490bd0d 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -6529,14 +6529,16 @@ end_trans: | |||
6529 | ret = btrfs_orphan_del(NULL, inode); | 6529 | ret = btrfs_orphan_del(NULL, inode); |
6530 | } | 6530 | } |
6531 | 6531 | ||
6532 | trans->block_rsv = &root->fs_info->trans_block_rsv; | 6532 | if (trans) { |
6533 | ret = btrfs_update_inode(trans, root, inode); | 6533 | trans->block_rsv = &root->fs_info->trans_block_rsv; |
6534 | if (ret && !err) | 6534 | ret = btrfs_update_inode(trans, root, inode); |
6535 | err = ret; | 6535 | if (ret && !err) |
6536 | err = ret; | ||
6536 | 6537 | ||
6537 | nr = trans->blocks_used; | 6538 | nr = trans->blocks_used; |
6538 | ret = btrfs_end_transaction_throttle(trans, root); | 6539 | ret = btrfs_end_transaction_throttle(trans, root); |
6539 | btrfs_btree_balance_dirty(root, nr); | 6540 | btrfs_btree_balance_dirty(root, nr); |
6541 | } | ||
6540 | 6542 | ||
6541 | out: | 6543 | out: |
6542 | btrfs_free_block_rsv(root, rsv); | 6544 | btrfs_free_block_rsv(root, rsv); |