diff options
| author | David Sterba <dsterba@suse.com> | 2025-02-17 22:15:25 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-03-18 20:35:43 +0100 |
| commit | 44dddd493e31074b7a25ec22da7b49df58e3ea3b (patch) | |
| tree | 76c610dbb271d47d131868bcb88e60bc7799b475 /fs/btrfs/direct-io.c | |
| parent | 6149c82bdaff63203e58a4910d9245468d281f39 (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/direct-io.c')
| -rw-r--r-- | fs/btrfs/direct-io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/direct-io.c b/fs/btrfs/direct-io.c index eacbb74bf6bc..a374ce7a1813 100644 --- a/fs/btrfs/direct-io.c +++ b/fs/btrfs/direct-io.c @@ -248,7 +248,8 @@ static int btrfs_get_blocks_direct_write(struct extent_map **map, len = min(len, em->len - (start - em->start)); block_start = extent_map_block_start(em) + (start - em->start); - if (can_nocow_extent(inode, start, &len, &file_extent, false) == 1) { + if (can_nocow_extent(BTRFS_I(inode), start, &len, &file_extent, + false) == 1) { bg = btrfs_inc_nocow_writers(fs_info, block_start); if (bg) can_nocow = true; |
