diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2013-03-28 08:08:20 +0000 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-03-28 09:51:30 -0400 |
commit | 39847c4d3d91f487f9ab3d083ee5d0f8419f105c (patch) | |
tree | 9de238dbe4fbe627d4b8914561827cf6b3d9c19e /fs/btrfs/file-item.c | |
parent | a7975026ff9ddf91ba190ae2b71699dd156395e3 (diff) | |
download | kernel_goldelico_gta04-39847c4d3d91f487f9ab3d083ee5d0f8419f105c.zip kernel_goldelico_gta04-39847c4d3d91f487f9ab3d083ee5d0f8419f105c.tar.gz kernel_goldelico_gta04-39847c4d3d91f487f9ab3d083ee5d0f8419f105c.tar.bz2 |
Btrfs: fix wrong reservation of csums
We reserve the space for csums only when we write data into a file, in
the other cases, such as tree log, log replay, we don't do reservation,
so we can use the reservation of the transaction handle just for the former.
And for the latter, we should use the tree's own reservation. But the
function - btrfs_csum_file_blocks() didn't differentiate between these
two types of the cases, fix it.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r-- | fs/btrfs/file-item.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index ec16020..b7e529d 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -728,7 +728,6 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans, return -ENOMEM; sector_sum = sums->sums; - trans->adding_csums = 1; again: next_offset = (u64)-1; found_next = 0; @@ -899,7 +898,6 @@ next_sector: goto again; } out: - trans->adding_csums = 0; btrfs_free_path(path); return ret; |