aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 184bde1cfc3d..bfa4149c053d 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -507,11 +507,12 @@ next_slot:
507 slot = path->slots[0]; 507 slot = path->slots[0];
508 ret = 0; 508 ret = 0;
509 btrfs_item_key_to_cpu(leaf, &key, slot); 509 btrfs_item_key_to_cpu(leaf, &key, slot);
510 510 if (btrfs_key_type(&key) == BTRFS_EXTENT_DATA_KEY &&
511 if (key.offset >= end || key.objectid != inode->i_ino) { 511 key.offset >= end) {
512 goto out; 512 goto out;
513 } 513 }
514 if (btrfs_key_type(&key) > BTRFS_EXTENT_DATA_KEY) { 514 if (btrfs_key_type(&key) > BTRFS_EXTENT_DATA_KEY ||
515 key.objectid != inode->i_ino) {
515 goto out; 516 goto out;
516 } 517 }
517 if (recow) { 518 if (recow) {