diff mbox series

[06/20] shmem: export shmem_kernel_file_setup

Message ID 20240129143502.189370-7-hch@lst.de (mailing list archive)
State New
Headers show
Series [01/20] mm: move mapping_set_update out of <linux/swap.h> | expand

Commit Message

Christoph Hellwig Jan. 29, 2024, 2:34 p.m. UTC
XFS wants to use this for it's internal in-memory data structures and
currently duplicates the functionality.  Export shmem_kernel_file_setup
to allow XFS to switch over to using the proper kernel API.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 mm/shmem.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Darrick J. Wong Jan. 29, 2024, 4:24 p.m. UTC | #1
On Mon, Jan 29, 2024 at 03:34:48PM +0100, Christoph Hellwig wrote:
> XFS wants to use this for it's internal in-memory data structures and
> currently duplicates the functionality.  Export shmem_kernel_file_setup
> to allow XFS to switch over to using the proper kernel API.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>

Looks ok,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  mm/shmem.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/shmem.c b/mm/shmem.c
> index dae684cd3c99fb..e89fb5eccb0c0a 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -4856,6 +4856,7 @@ struct file *shmem_kernel_file_setup(const char *name, loff_t size, unsigned lon
>  {
>  	return __shmem_file_setup(shm_mnt, name, size, flags, S_PRIVATE);
>  }
> +EXPORT_SYMBOL_GPL(shmem_kernel_file_setup);
>  
>  /**
>   * shmem_file_setup - get an unlinked file living in tmpfs
> -- 
> 2.39.2
> 
>
diff mbox series

Patch

diff --git a/mm/shmem.c b/mm/shmem.c
index dae684cd3c99fb..e89fb5eccb0c0a 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -4856,6 +4856,7 @@  struct file *shmem_kernel_file_setup(const char *name, loff_t size, unsigned lon
 {
 	return __shmem_file_setup(shm_mnt, name, size, flags, S_PRIVATE);
 }
+EXPORT_SYMBOL_GPL(shmem_kernel_file_setup);
 
 /**
  * shmem_file_setup - get an unlinked file living in tmpfs