btrfs: missing initialization while adding extent
RFC PATCH 1/1 btrfs: missing initialization while adding extent
If we race while adding an extent and successful look it of afterwards, we don't set the em->bdev. Now we do :-)
Signed-off-by Ingo Oeser <[email protected]>
--- fs/btrfs/disk-io.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
fs/btrfs/disk-io.c +1 -0
@@ -118,6 +118,7 @@ static struct extent_map *btree_get_extent(struct inode *inode,free_extent_map (em); em =lookup_extent_mapping (em_tree, start, len);if (em) { + em->bdev =BTRFS_I (inode)->root->fs_info->fs_devices->latest_bdev; ret =0 ; }else { em = lookup_extent_mapping(em_tree, failed_start,
Signature · 1 line
1.5.6.3
Quoted 3 lines · Ingo Oeser
If we race while adding an extent and successful look it of afterwards, we don't set the
em->bdev. Now we do :-)
Thanks, queued up.
-chris