@@ -180,7 +180,7 @@ void extent_range_clear_dirty_for_io(struct inode *inode, u64 start, u64 end)
180180}
181181
182182static void process_one_page (struct btrfs_fs_info * fs_info ,
183- struct page * page , struct page * locked_page ,
183+ struct page * page , const struct page * locked_page ,
184184 unsigned long page_ops , u64 start , u64 end )
185185{
186186 struct folio * folio = page_folio (page );
@@ -203,7 +203,7 @@ static void process_one_page(struct btrfs_fs_info *fs_info,
203203}
204204
205205static void __process_pages_contig (struct address_space * mapping ,
206- struct page * locked_page , u64 start , u64 end ,
206+ const struct page * locked_page , u64 start , u64 end ,
207207 unsigned long page_ops )
208208{
209209 struct btrfs_fs_info * fs_info = inode_to_fs_info (mapping -> host );
@@ -230,8 +230,8 @@ static void __process_pages_contig(struct address_space *mapping,
230230 }
231231}
232232
233- static noinline void __unlock_for_delalloc (struct inode * inode ,
234- struct page * locked_page ,
233+ static noinline void __unlock_for_delalloc (const struct inode * inode ,
234+ const struct page * locked_page ,
235235 u64 start , u64 end )
236236{
237237 unsigned long index = start >> PAGE_SHIFT ;
@@ -246,7 +246,7 @@ static noinline void __unlock_for_delalloc(struct inode *inode,
246246}
247247
248248static noinline int lock_delalloc_pages (struct inode * inode ,
249- struct page * locked_page ,
249+ const struct page * locked_page ,
250250 u64 start ,
251251 u64 end )
252252{
@@ -411,7 +411,7 @@ noinline_for_stack bool find_lock_delalloc_range(struct inode *inode,
411411}
412412
413413void extent_clear_unlock_delalloc (struct btrfs_inode * inode , u64 start , u64 end ,
414- struct page * locked_page ,
414+ const struct page * locked_page ,
415415 struct extent_state * * cached ,
416416 u32 clear_bits , unsigned long page_ops )
417417{
@@ -1382,7 +1382,7 @@ static noinline_for_stack int writepage_delalloc(struct btrfs_inode *inode,
13821382 * Return the next dirty range in [@start, @end).
13831383 * If no dirty range is found, @start will be page_offset(page) + PAGE_SIZE.
13841384 */
1385- static void find_next_dirty_byte (struct btrfs_fs_info * fs_info ,
1385+ static void find_next_dirty_byte (const struct btrfs_fs_info * fs_info ,
13861386 struct page * page , u64 * start , u64 * end )
13871387{
13881388 struct folio * folio = page_folio (page );
@@ -1743,7 +1743,7 @@ static void set_btree_ioerr(struct extent_buffer *eb)
17431743 * context.
17441744 */
17451745static struct extent_buffer * find_extent_buffer_nolock (
1746- struct btrfs_fs_info * fs_info , u64 start )
1746+ const struct btrfs_fs_info * fs_info , u64 start )
17471747{
17481748 struct extent_buffer * eb ;
17491749
@@ -2312,7 +2312,7 @@ static int extent_write_cache_pages(struct address_space *mapping,
23122312 * already been ran (aka, ordered extent inserted) and all pages are still
23132313 * locked.
23142314 */
2315- void extent_write_locked_range (struct inode * inode , struct page * locked_page ,
2315+ void extent_write_locked_range (struct inode * inode , const struct page * locked_page ,
23162316 u64 start , u64 end , struct writeback_control * wbc ,
23172317 bool pages_dirty )
23182318{
@@ -2597,7 +2597,7 @@ static bool folio_range_has_eb(struct btrfs_fs_info *fs_info, struct folio *foli
25972597 return false;
25982598}
25992599
2600- static void detach_extent_buffer_folio (struct extent_buffer * eb , struct folio * folio )
2600+ static void detach_extent_buffer_folio (const struct extent_buffer * eb , struct folio * folio )
26012601{
26022602 struct btrfs_fs_info * fs_info = eb -> fs_info ;
26032603 const bool mapped = !test_bit (EXTENT_BUFFER_UNMAPPED , & eb -> bflags );
@@ -2658,7 +2658,7 @@ static void detach_extent_buffer_folio(struct extent_buffer *eb, struct folio *f
26582658}
26592659
26602660/* Release all pages attached to the extent buffer */
2661- static void btrfs_release_extent_buffer_pages (struct extent_buffer * eb )
2661+ static void btrfs_release_extent_buffer_pages (const struct extent_buffer * eb )
26622662{
26632663 ASSERT (!extent_buffer_under_io (eb ));
26642664
@@ -3573,7 +3573,7 @@ static void end_bbio_meta_read(struct btrfs_bio *bbio)
35733573}
35743574
35753575int read_extent_buffer_pages (struct extent_buffer * eb , int wait , int mirror_num ,
3576- struct btrfs_tree_parent_check * check )
3576+ const struct btrfs_tree_parent_check * check )
35773577{
35783578 struct btrfs_bio * bbio ;
35793579 bool ret ;
@@ -4186,7 +4186,7 @@ void memmove_extent_buffer(const struct extent_buffer *dst,
41864186
41874187#define GANG_LOOKUP_SIZE 16
41884188static struct extent_buffer * get_next_extent_buffer (
4189- struct btrfs_fs_info * fs_info , struct page * page , u64 bytenr )
4189+ const struct btrfs_fs_info * fs_info , struct page * page , u64 bytenr )
41904190{
41914191 struct extent_buffer * gang [GANG_LOOKUP_SIZE ];
41924192 struct extent_buffer * found = NULL ;
0 commit comments