aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <[email protected]>2025-05-13 06:19:37 +0000
committerGreg Kroah-Hartman <[email protected]>2025-05-13 06:19:37 +0000
commit991919e969043a4422dfebbcadf600a5d28b94e4 (patch)
tree4776f9f162c665a9735198fafc466d3e49a14253 /fs/btrfs/inode.c
parentcomedi: drivers: adl_pci9118.c: Edit file so that checkpatch.pl has 0 typo er... (diff)
parentLinux 6.15-rc6 (diff)
downloadkernel-991919e969043a4422dfebbcadf600a5d28b94e4.tar.gz
kernel-991919e969043a4422dfebbcadf600a5d28b94e4.zip
Merge 6.15-rc6 into char-misc-next
We need the iio/hyperv fixes in here as well. Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index cc67d1a2d611..bdafe4d4c4a5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2129,12 +2129,13 @@ next_slot:
/*
* If the found extent starts after requested offset, then
- * adjust extent_end to be right before this extent begins
+ * adjust cur_offset to be right before this extent begins.
*/
if (found_key.offset > cur_offset) {
- extent_end = found_key.offset;
- extent_type = 0;
- goto must_cow;
+ if (cow_start == (u64)-1)
+ cow_start = cur_offset;
+ cur_offset = found_key.offset;
+ goto next_slot;
}
/*
@@ -5681,8 +5682,10 @@ struct btrfs_inode *btrfs_iget(u64 ino, struct btrfs_root *root)
return inode;
path = btrfs_alloc_path();
- if (!path)
+ if (!path) {
+ iget_failed(&inode->vfs_inode);
return ERR_PTR(-ENOMEM);
+ }
ret = btrfs_read_locked_inode(inode, path);
btrfs_free_path(path);