aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-11-10 11:53:33 -0500
committerChris Mason <chris.mason@oracle.com>2008-11-10 11:53:33 -0500
commit445a69449994a37615cd47e47bcab2e42a070adf (patch)
treeeb41f8246fe64bd32c1bb9ee544b1b27866ec79b /fs/btrfs/file.c
parent39be25cd89450940b0e5f8a6aad71d1ec99b17bf (diff)
Btrfs: Fix usage of struct extent_map->orig_start
This makes sure the orig_start field in struct extent_map gets set everywhere the extent_map structs are created or modified. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 85841c538805..4119f9a95320 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -244,16 +244,17 @@ int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end,
244 244
245 split->start = start + len; 245 split->start = start + len;
246 split->len = em->start + em->len - (start + len); 246 split->len = em->start + em->len - (start + len);
247 split->orig_start = em->orig_start;
248 split->bdev = em->bdev; 247 split->bdev = em->bdev;
249 split->flags = flags; 248 split->flags = flags;
250 249
251 if (compressed) { 250 if (compressed) {
252 split->block_len = em->block_len; 251 split->block_len = em->block_len;
253 split->block_start = em->block_start; 252 split->block_start = em->block_start;
253 split->orig_start = em->orig_start;
254 } else { 254 } else {
255 split->block_len = split->len; 255 split->block_len = split->len;
256 split->block_start = em->block_start + diff; 256 split->block_start = em->block_start + diff;
257 split->orig_start = split->start;
257 } 258 }
258 259
259 ret = add_extent_mapping(em_tree, split); 260 ret = add_extent_mapping(em_tree, split);