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 09:56, Nikolay Borisov wrote:

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,

Yes, it need to be renamed.

  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?

Because I followed EXPORT_SYMBOL(__wait_on_buffer).

Thanks,
Guoqing



[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