Re: [PATCH 04/21] shmem: move the shmem_mapping assert into shmem_get_folio_gfp

Matthew Wilcox
2024-01-26T15:09:17Z

On Fri, Jan 26, 2024 at 02:28:46PM +0100, Christoph Hellwig wrote:
> Move the check that the inode really is a shmemfs one from
> shmem_read_folio_gfp to shmem_get_folio_gfp given that shmem_get_folio
> can also be called from outside of shmem.c. Also turn it into a
> WARN_ON_ONCE and error return instead of BUG_ON to be less severe.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Darrick J. Wong <djwong@kernel.org>

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>