You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
btrfs_drop_extents: handle BTRFS_INODE_REF_KEY types
It's possible "key.type == BTRFS_INODE_REF_KEY" and "key.offset >= end". Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
+4
-3
@@ -507,11 +507,12 @@ next_slot:
|
||||
slot = path->slots[0];
|
||||
ret = 0;
|
||||
btrfs_item_key_to_cpu(leaf, &key, slot);
|
||||
|
||||
if (key.offset >= end || key.objectid != inode->i_ino) {
|
||||
if (btrfs_key_type(&key) == BTRFS_EXTENT_DATA_KEY &&
|
||||
key.offset >= end) {
|
||||
goto out;
|
||||
}
|
||||
if (btrfs_key_type(&key) > BTRFS_EXTENT_DATA_KEY) {
|
||||
if (btrfs_key_type(&key) > BTRFS_EXTENT_DATA_KEY ||
|
||||
key.objectid != inode->i_ino) {
|
||||
goto out;
|
||||
}
|
||||
if (recow) {
|
||||
|
||||
Reference in New Issue
Block a user