diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-13 19:30:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-13 19:30:29 -0500 |
commit | e75cdf9898132f521df98a3ce1c280a2f85d360a (patch) | |
tree | 4f6a24cf7ab56b962cc8bead17895521b5985dc6 /fs/btrfs/file.c | |
parent | ca4ba96e02e932a0c9997a40fd51253b5b2d0f9d (diff) | |
parent | d5f2e33b92b10b8007be50b570a27e9bacfb4c3a (diff) |
Merge branch 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes and cleanups from Chris Mason:
"Some of this got cherry-picked from a github repo this week, but I
verified the patches.
We have three small scrub cleanups and a collection of fixes"
* 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
btrfs: Use fs_info directly in btrfs_delete_unused_bgs
btrfs: Fix lost-data-profile caused by balance bg
btrfs: Fix lost-data-profile caused by auto removing bg
btrfs: Remove len argument from scrub_find_csum
btrfs: Reduce unnecessary arguments in scrub_recheck_block
btrfs: Use scrub_checksum_data and scrub_checksum_tree_block for scrub_recheck_block_checksum
btrfs: Reset sblock->xxx_error stats before calling scrub_recheck_block_checksum
btrfs: scrub: setup all fields for sblock_to_check
btrfs: scrub: set error stats when tree block spanning stripes
Btrfs: fix race when listing an inode's xattrs
Btrfs: fix race leading to BUG_ON when running delalloc for nodatacow
Btrfs: fix race leading to incorrect item deletion when dropping extents
Btrfs: fix sleeping inside atomic context in qgroup rescan worker
Btrfs: fix race waiting for qgroup rescan worker
btrfs: qgroup: exit the rescan worker during umount
Btrfs: fix extent accounting for partial direct IO writes
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 6bd5ce9d75f0..977e715f0bf2 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -756,8 +756,16 @@ next_slot: | |||
756 | } | 756 | } |
757 | 757 | ||
758 | btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); | 758 | btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); |
759 | if (key.objectid > ino || | 759 | |
760 | key.type > BTRFS_EXTENT_DATA_KEY || key.offset >= end) | 760 | if (key.objectid > ino) |
761 | break; | ||
762 | if (WARN_ON_ONCE(key.objectid < ino) || | ||
763 | key.type < BTRFS_EXTENT_DATA_KEY) { | ||
764 | ASSERT(del_nr == 0); | ||
765 | path->slots[0]++; | ||
766 | goto next_slot; | ||
767 | } | ||
768 | if (key.type > BTRFS_EXTENT_DATA_KEY || key.offset >= end) | ||
761 | break; | 769 | break; |
762 | 770 | ||
763 | fi = btrfs_item_ptr(leaf, path->slots[0], | 771 | fi = btrfs_item_ptr(leaf, path->slots[0], |
@@ -776,8 +784,8 @@ next_slot: | |||
776 | btrfs_file_extent_inline_len(leaf, | 784 | btrfs_file_extent_inline_len(leaf, |
777 | path->slots[0], fi); | 785 | path->slots[0], fi); |
778 | } else { | 786 | } else { |
779 | WARN_ON(1); | 787 | /* can't happen */ |
780 | extent_end = search_start; | 788 | BUG(); |
781 | } | 789 | } |
782 | 790 | ||
783 | /* | 791 | /* |