diff mbox series

[15/26] mm: Export writeback_iter()

Message ID 20240328163424.2781320-16-dhowells@redhat.com (mailing list archive)
State New
Headers show
Series netfs, afs, 9p, cifs: Rework netfs to use ->writepages() to copy to cache | expand

Commit Message

David Howells March 28, 2024, 4:34 p.m. UTC
Export writeback_iter() so that it can be used by netfslib as a module.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Matthew Wilcox (Oracle) <willy@infradead.org>
cc: Christoph Hellwig <hch@lst.de>
cc: linux-mm@kvack.org
---
 mm/page-writeback.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Christoph Hellwig April 3, 2024, 8:59 a.m. UTC | #1
On Thu, Mar 28, 2024 at 04:34:07PM +0000, David Howells wrote:
> Export writeback_iter() so that it can be used by netfslib as a module.

EXPORT_SYMBOL_GPL, please.
David Howells April 3, 2024, 10:10 a.m. UTC | #2
Christoph Hellwig <hch@lst.de> wrote:

> On Thu, Mar 28, 2024 at 04:34:07PM +0000, David Howells wrote:
> > Export writeback_iter() so that it can be used by netfslib as a module.
> 
> EXPORT_SYMBOL_GPL, please.

That depends.  You put a comment on write_cache_pages() saying that people
should use writeback_iter() instead.  w_c_p() is not marked GPL.  Is it your
intention to get rid of it?

David
Christoph Hellwig April 3, 2024, 10:14 a.m. UTC | #3
On Wed, Apr 03, 2024 at 11:10:47AM +0100, David Howells wrote:
> That depends.  You put a comment on write_cache_pages() saying that people
> should use writeback_iter() instead.  w_c_p() is not marked GPL.  Is it your
> intention to get rid of it?

Yes.  If you think you're not a derivate work of Linux you have no
business using either one.
David Howells April 3, 2024, 10:55 a.m. UTC | #4
Christoph Hellwig <hch@lst.de> wrote:

> On Wed, Apr 03, 2024 at 11:10:47AM +0100, David Howells wrote:
> > That depends.  You put a comment on write_cache_pages() saying that people
> > should use writeback_iter() instead.  w_c_p() is not marked GPL.  Is it your
> > intention to get rid of it?
> 
> Yes.  If you think you're not a derivate work of Linux you have no
> business using either one.

So why are we bothering with EXPORT_SYMBOL at all?  Why don't you just send a
patch replace all of them with EXPORT_SYMBOL_GPL()?

David
Christoph Hellwig April 3, 2024, 12:41 p.m. UTC | #5
On Wed, Apr 03, 2024 at 11:55:00AM +0100, David Howells wrote:
> So why are we bothering with EXPORT_SYMBOL at all?  Why don't you just send a
> patch replace all of them with EXPORT_SYMBOL_GPL()?

No my business.  But if you want to side track this let me just put this
in here:

NAK to the non-GPL EXPORT of writeback_iter().
David Howells April 3, 2024, 12:58 p.m. UTC | #6
Christoph Hellwig <hch@lst.de> wrote:

> > So why are we bothering with EXPORT_SYMBOL at all?  Why don't you just
> > send a patch replace all of them with EXPORT_SYMBOL_GPL()?
> 
> No my business.

Clearly it is as you're gradually replacing APIs with stuff that is GPL'd.

> But if you want to side track this let me just put this in here:
> 
> NAK to the non-GPL EXPORT of writeback_iter().

Very well, I'll switch that export to GPL.  Christian, if you can amend that
patch in your tree?

David
Christoph Hellwig April 5, 2024, 6:53 a.m. UTC | #7
On Wed, Apr 03, 2024 at 01:58:15PM +0100, David Howells wrote:
> Very well, I'll switch that export to GPL.  Christian, if you can amend that
> patch in your tree?

Thanks!
Christian Brauner April 5, 2024, 10:15 a.m. UTC | #8
On Wed, Apr 03, 2024 at 01:58:15PM +0100, David Howells wrote:
> Christoph Hellwig <hch@lst.de> wrote:
> 
> > > So why are we bothering with EXPORT_SYMBOL at all?  Why don't you just
> > > send a patch replace all of them with EXPORT_SYMBOL_GPL()?
> > 
> > No my business.
> 
> Clearly it is as you're gradually replacing APIs with stuff that is GPL'd.
> 
> > But if you want to side track this let me just put this in here:
> > 
> > NAK to the non-GPL EXPORT of writeback_iter().
> 
> Very well, I'll switch that export to GPL.  Christian, if you can amend that
> patch in your tree?

Sorted yesterday night!
diff mbox series

Patch

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 3e19b87049db..9df160a1cf9e 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2546,6 +2546,7 @@  struct folio *writeback_iter(struct address_space *mapping,
 	folio_batch_release(&wbc->fbatch);
 	return NULL;
 }
+EXPORT_SYMBOL(writeback_iter);
 
 /**
  * write_cache_pages - walk the list of dirty pages of the given address space and write all of them.