diff options
Diffstat (limited to 'fs/btrfs/ordered-data.c')
-rw-r--r-- | fs/btrfs/ordered-data.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index e7317c8fda29..370bb4285597 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c | |||
@@ -182,7 +182,7 @@ int btrfs_add_ordered_extent(struct inode *inode, u64 file_offset, | |||
182 | entry->len = len; | 182 | entry->len = len; |
183 | entry->disk_len = disk_len; | 183 | entry->disk_len = disk_len; |
184 | entry->inode = inode; | 184 | entry->inode = inode; |
185 | if (type == BTRFS_ORDERED_NOCOW || type == BTRFS_ORDERED_COMPRESSED) | 185 | if (type != BTRFS_ORDERED_IO_DONE && type != BTRFS_ORDERED_COMPLETE) |
186 | set_bit(type, &entry->flags); | 186 | set_bit(type, &entry->flags); |
187 | 187 | ||
188 | /* one ref for the tree */ | 188 | /* one ref for the tree */ |
@@ -339,7 +339,8 @@ int btrfs_wait_ordered_extents(struct btrfs_root *root, int nocow_only) | |||
339 | ordered = list_entry(cur, struct btrfs_ordered_extent, | 339 | ordered = list_entry(cur, struct btrfs_ordered_extent, |
340 | root_extent_list); | 340 | root_extent_list); |
341 | if (nocow_only && | 341 | if (nocow_only && |
342 | !test_bit(BTRFS_ORDERED_NOCOW, &ordered->flags)) { | 342 | !test_bit(BTRFS_ORDERED_NOCOW, &ordered->flags) && |
343 | !test_bit(BTRFS_ORDERED_PREALLOC, &ordered->flags)) { | ||
343 | list_move(&ordered->root_extent_list, | 344 | list_move(&ordered->root_extent_list, |
344 | &root->fs_info->ordered_extents); | 345 | &root->fs_info->ordered_extents); |
345 | cond_resched_lock(&root->fs_info->ordered_extent_lock); | 346 | cond_resched_lock(&root->fs_info->ordered_extent_lock); |