Re: [PATCH 1/5] fs/buffer: export __clear_page_buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 19.04.20 г. 1:51 ч., Guoqing Jiang wrote:
> Export the function so others (such as md, btrfs and iomap) can reuse it.
> 
> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Guoqing Jiang <guoqing.jiang@xxxxxxxxxxxxxxx>
> ---
>  fs/buffer.c                 | 4 ++--
>  include/linux/buffer_head.h | 1 +
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/buffer.c b/fs/buffer.c
> index f73276d746bb..05b7489d9aa3 100644
> --- a/fs/buffer.c
> +++ b/fs/buffer.c
> @@ -123,13 +123,13 @@ void __wait_on_buffer(struct buffer_head * bh)
>  }
>  EXPORT_SYMBOL(__wait_on_buffer);
>  
> -static void
> -__clear_page_buffers(struct page *page)
> +void __clear_page_buffers(struct page *page)
>  {
>  	ClearPagePrivate(page);
>  	set_page_private(page, 0);
>  	put_page(page);
>  }
> +EXPORT_SYMBOL(__clear_page_buffers);

Since this is being exported there is no reason to have __ prefix.
Rename the function as well, also why are you exporting it EXPORT_SYMBOL
and not EXPORT_SYMBOL_GPL just for the sake of consistency with other
functions in this file or some other reason?

>  
>  static void buffer_io_error(struct buffer_head *bh, char *msg)
>  {
> diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
> index e0b020eaf32e..735b094d89e1 100644
> --- a/include/linux/buffer_head.h
> +++ b/include/linux/buffer_head.h
> @@ -181,6 +181,7 @@ static inline void clean_bdev_bh_alias(struct buffer_head *bh)
>  
>  void mark_buffer_async_write(struct buffer_head *bh);
>  void __wait_on_buffer(struct buffer_head *);
> +void __clear_page_buffers(struct page *page);
>  wait_queue_head_t *bh_waitq_head(struct buffer_head *bh);
>  struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block,
>  			unsigned size);
> 



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux