summaryrefslogtreecommitdiff
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2025-02-17 22:15:25 +0100
committerDavid Sterba <dsterba@suse.com>2025-03-18 20:35:43 +0100
commit44dddd493e31074b7a25ec22da7b49df58e3ea3b (patch)
tree76c610dbb271d47d131868bcb88e60bc7799b475 /fs/btrfs/file.c
parent6149c82bdaff63203e58a4910d9245468d281f39 (diff)
btrfs: pass struct btrfs_inode to can_nocow_extent()
Pass a struct btrfs_inode to can_nocow_extent() as it's an internal interface, allowing to remove some use of BTRFS_I. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 59af01d6cc56..f78cfe5dfa2c 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1013,8 +1013,7 @@ int btrfs_check_nocow_lock(struct btrfs_inode *inode, loff_t pos,
btrfs_lock_and_flush_ordered_range(inode, lockstart, lockend,
&cached_state);
}
- ret = can_nocow_extent(&inode->vfs_inode, lockstart, &num_bytes,
- NULL, nowait);
+ ret = can_nocow_extent(inode, lockstart, &num_bytes, NULL, nowait);
if (ret <= 0)
btrfs_drew_write_unlock(&root->snapshot_lock);
else