diff mbox series

[7/7] buffer: Remove set_bh_page()

Message ID 20230713035512.4139457-8-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series More filesystem folio conversions for 6.6 | expand

Commit Message

Matthew Wilcox July 13, 2023, 3:55 a.m. UTC
With all users converted to folio_set_bh(), remove this function.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/buffer.c                 | 15 ---------------
 include/linux/buffer_head.h |  2 --
 2 files changed, 17 deletions(-)

Comments

Jan Kara July 31, 2023, 2:46 p.m. UTC | #1
On Thu 13-07-23 04:55:12, Matthew Wilcox (Oracle) wrote:
> With all users converted to folio_set_bh(), remove this function.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>

Sure. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/buffer.c                 | 15 ---------------
>  include/linux/buffer_head.h |  2 --
>  2 files changed, 17 deletions(-)
> 
> diff --git a/fs/buffer.c b/fs/buffer.c
> index 587e4d4af9de..f0563ebae75f 100644
> --- a/fs/buffer.c
> +++ b/fs/buffer.c
> @@ -1539,21 +1539,6 @@ void invalidate_bh_lrus_cpu(void)
>  	bh_lru_unlock();
>  }
>  
> -void set_bh_page(struct buffer_head *bh,
> -		struct page *page, unsigned long offset)
> -{
> -	bh->b_page = page;
> -	BUG_ON(offset >= PAGE_SIZE);
> -	if (PageHighMem(page))
> -		/*
> -		 * This catches illegal uses and preserves the offset:
> -		 */
> -		bh->b_data = (char *)(0 + offset);
> -	else
> -		bh->b_data = page_address(page) + offset;
> -}
> -EXPORT_SYMBOL(set_bh_page);
> -
>  void folio_set_bh(struct buffer_head *bh, struct folio *folio,
>  		  unsigned long offset)
>  {
> diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
> index a7377877ff4e..06566aee94ca 100644
> --- a/include/linux/buffer_head.h
> +++ b/include/linux/buffer_head.h
> @@ -194,8 +194,6 @@ void buffer_check_dirty_writeback(struct folio *folio,
>  void mark_buffer_dirty(struct buffer_head *bh);
>  void mark_buffer_write_io_error(struct buffer_head *bh);
>  void touch_buffer(struct buffer_head *bh);
> -void set_bh_page(struct buffer_head *bh,
> -		struct page *page, unsigned long offset);
>  void folio_set_bh(struct buffer_head *bh, struct folio *folio,
>  		  unsigned long offset);
>  bool try_to_free_buffers(struct folio *);
> -- 
> 2.39.2
>
diff mbox series

Patch

diff --git a/fs/buffer.c b/fs/buffer.c
index 587e4d4af9de..f0563ebae75f 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1539,21 +1539,6 @@  void invalidate_bh_lrus_cpu(void)
 	bh_lru_unlock();
 }
 
-void set_bh_page(struct buffer_head *bh,
-		struct page *page, unsigned long offset)
-{
-	bh->b_page = page;
-	BUG_ON(offset >= PAGE_SIZE);
-	if (PageHighMem(page))
-		/*
-		 * This catches illegal uses and preserves the offset:
-		 */
-		bh->b_data = (char *)(0 + offset);
-	else
-		bh->b_data = page_address(page) + offset;
-}
-EXPORT_SYMBOL(set_bh_page);
-
 void folio_set_bh(struct buffer_head *bh, struct folio *folio,
 		  unsigned long offset)
 {
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index a7377877ff4e..06566aee94ca 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -194,8 +194,6 @@  void buffer_check_dirty_writeback(struct folio *folio,
 void mark_buffer_dirty(struct buffer_head *bh);
 void mark_buffer_write_io_error(struct buffer_head *bh);
 void touch_buffer(struct buffer_head *bh);
-void set_bh_page(struct buffer_head *bh,
-		struct page *page, unsigned long offset);
 void folio_set_bh(struct buffer_head *bh, struct folio *folio,
 		  unsigned long offset);
 bool try_to_free_buffers(struct folio *);