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 branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
"We have two more fixes in my for-linus branch.

I was hoping to also include a fix for a btrfs deadlock with
compression enabled, but we're still nailing that one down"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
btrfs: test for valid bdev before kobj removal in btrfs_rm_device
Btrfs: fix abnormal long waiting in fsync

+15 -4
+11
fs/btrfs/ordered-data.c
··· 484 484 log_list); 485 485 list_del_init(&ordered->log_list); 486 486 spin_unlock_irq(&log->log_extents_lock[index]); 487 + 488 + if (!test_bit(BTRFS_ORDERED_IO_DONE, &ordered->flags) && 489 + !test_bit(BTRFS_ORDERED_DIRECT, &ordered->flags)) { 490 + struct inode *inode = ordered->inode; 491 + u64 start = ordered->file_offset; 492 + u64 end = ordered->file_offset + ordered->len - 1; 493 + 494 + WARN_ON(!inode); 495 + filemap_fdatawrite_range(inode->i_mapping, start, end); 496 + } 487 497 wait_event(ordered->wait, test_bit(BTRFS_ORDERED_IO_DONE, 488 498 &ordered->flags)); 499 + 489 500 btrfs_put_ordered_extent(ordered); 490 501 spin_lock_irq(&log->log_extents_lock[index]); 491 502 }
+4 -4
fs/btrfs/volumes.c
··· 1680 1680 if (device->bdev == root->fs_info->fs_devices->latest_bdev) 1681 1681 root->fs_info->fs_devices->latest_bdev = next_device->bdev; 1682 1682 1683 - if (device->bdev) 1683 + if (device->bdev) { 1684 1684 device->fs_devices->open_devices--; 1685 - 1686 - /* remove sysfs entry */ 1687 - btrfs_kobj_rm_device(root->fs_info, device); 1685 + /* remove sysfs entry */ 1686 + btrfs_kobj_rm_device(root->fs_info, device); 1687 + } 1688 1688 1689 1689 call_rcu(&device->rcu, free_device); 1690 1690