On Fri, Dec 15, 2023 at 10:05:33PM -0800, Vivek Kasireddy wrote: > +++ b/include/linux/memfd.h > @@ -6,11 +6,16 @@ > > #ifdef CONFIG_MEMFD_CREATE > extern long memfd_fcntl(struct file *file, unsigned int cmd, unsigned int arg); > +extern struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx); You don't need the 'extern' for functions. > #else > static inline long memfd_fcntl(struct file *f, unsigned int c, unsigned int a) > { > return -EINVAL; > } > +static inline struct page *memfd_alloc_folio(struct file *memfd, pgoff_t idx) > +{ > + return ERR_PTR(-EINVAL); > +} > #endif Different return types depending on the CONFIG selected ...