Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-4.18-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fix from David Sterba:
"A fix of a corruption regarding fsync and clone, under some very
specific conditions explained in the patch.

The fix is marked for stable 3.16+ so I'd like to get it merged now
given the impact"

* tag 'for-4.18-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
Btrfs: fix file data corruption after cloning a range and fsync

+5 -2
+5 -2
fs/btrfs/extent_io.c
··· 4238 4238 struct extent_map *em; 4239 4239 u64 start = page_offset(page); 4240 4240 u64 end = start + PAGE_SIZE - 1; 4241 - struct extent_io_tree *tree = &BTRFS_I(page->mapping->host)->io_tree; 4242 - struct extent_map_tree *map = &BTRFS_I(page->mapping->host)->extent_tree; 4241 + struct btrfs_inode *btrfs_inode = BTRFS_I(page->mapping->host); 4242 + struct extent_io_tree *tree = &btrfs_inode->io_tree; 4243 + struct extent_map_tree *map = &btrfs_inode->extent_tree; 4243 4244 4244 4245 if (gfpflags_allow_blocking(mask) && 4245 4246 page->mapping->host->i_size > SZ_16M) { ··· 4263 4262 extent_map_end(em) - 1, 4264 4263 EXTENT_LOCKED | EXTENT_WRITEBACK, 4265 4264 0, NULL)) { 4265 + set_bit(BTRFS_INODE_NEEDS_FULL_SYNC, 4266 + &btrfs_inode->runtime_flags); 4266 4267 remove_extent_mapping(map, em); 4267 4268 /* once for the rb tree */ 4268 4269 free_extent_map(em);