diff options
Diffstat (limited to 'fs/btrfs/file-item.c')
| -rw-r--r-- | fs/btrfs/file-item.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 5d158d320233..b45b9de0c21d 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c | |||
| @@ -183,7 +183,7 @@ static int __btrfs_lookup_bio_sums(struct btrfs_root *root, | |||
| 183 | * read from the commit root and sidestep a nasty deadlock | 183 | * read from the commit root and sidestep a nasty deadlock |
| 184 | * between reading the free space cache and updating the csum tree. | 184 | * between reading the free space cache and updating the csum tree. |
| 185 | */ | 185 | */ |
| 186 | if (btrfs_is_free_space_inode(root, inode)) { | 186 | if (btrfs_is_free_space_inode(inode)) { |
| 187 | path->search_commit_root = 1; | 187 | path->search_commit_root = 1; |
| 188 | path->skip_locking = 1; | 188 | path->skip_locking = 1; |
| 189 | } | 189 | } |
| @@ -690,6 +690,7 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans, | |||
| 690 | return -ENOMEM; | 690 | return -ENOMEM; |
| 691 | 691 | ||
| 692 | sector_sum = sums->sums; | 692 | sector_sum = sums->sums; |
| 693 | trans->adding_csums = 1; | ||
| 693 | again: | 694 | again: |
| 694 | next_offset = (u64)-1; | 695 | next_offset = (u64)-1; |
| 695 | found_next = 0; | 696 | found_next = 0; |
| @@ -853,6 +854,7 @@ next_sector: | |||
| 853 | goto again; | 854 | goto again; |
| 854 | } | 855 | } |
| 855 | out: | 856 | out: |
| 857 | trans->adding_csums = 0; | ||
| 856 | btrfs_free_path(path); | 858 | btrfs_free_path(path); |
| 857 | return ret; | 859 | return ret; |
| 858 | 860 | ||
