Skip to content

Commit 06de96f

Browse files
committed
btrfs: rename __get_extent_map() and pass btrfs_inode
The double underscore naming scheme does not apply here, there's only only get_extent_map(). As the definition is changed also pass the struct btrfs_inode. Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Anand Jain <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 3a1c46d commit 06de96f

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

fs/btrfs/extent_io.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -896,9 +896,9 @@ void clear_folio_extent_mapped(struct folio *folio)
896896
folio_detach_private(folio);
897897
}
898898

899-
static struct extent_map *__get_extent_map(struct inode *inode,
900-
struct folio *folio, u64 start,
901-
u64 len, struct extent_map **em_cached)
899+
static struct extent_map *get_extent_map(struct btrfs_inode *inode,
900+
struct folio *folio, u64 start,
901+
u64 len, struct extent_map **em_cached)
902902
{
903903
struct extent_map *em;
904904
struct extent_state *cached_state = NULL;
@@ -917,14 +917,14 @@ static struct extent_map *__get_extent_map(struct inode *inode,
917917
*em_cached = NULL;
918918
}
919919

920-
btrfs_lock_and_flush_ordered_range(BTRFS_I(inode), start, start + len - 1, &cached_state);
921-
em = btrfs_get_extent(BTRFS_I(inode), folio, start, len);
920+
btrfs_lock_and_flush_ordered_range(inode, start, start + len - 1, &cached_state);
921+
em = btrfs_get_extent(inode, folio, start, len);
922922
if (!IS_ERR(em)) {
923923
BUG_ON(*em_cached);
924924
refcount_inc(&em->refs);
925925
*em_cached = em;
926926
}
927-
unlock_extent(&BTRFS_I(inode)->io_tree, start, start + len - 1, &cached_state);
927+
unlock_extent(&inode->io_tree, start, start + len - 1, &cached_state);
928928

929929
return em;
930930
}
@@ -980,8 +980,7 @@ static int btrfs_do_readpage(struct folio *folio, struct extent_map **em_cached,
980980
end_folio_read(folio, true, cur, iosize);
981981
break;
982982
}
983-
em = __get_extent_map(inode, folio, cur, end - cur + 1,
984-
em_cached);
983+
em = get_extent_map(BTRFS_I(inode), folio, cur, end - cur + 1, em_cached);
985984
if (IS_ERR(em)) {
986985
end_folio_read(folio, false, cur, end + 1 - cur);
987986
return PTR_ERR(em);

0 commit comments

Comments
 (0)