Re: [PATCH 3/6] xfs: simplify xfs_dax_fault

Christoph Hellwig
2024-06-21T05:06:02Z

On Thu, Jun 20, 2024 at 11:50:26AM -0700, Darrick J. Wong wrote:
> > + if (!IS_ENABLED(CONFIG_FS_DAX)) {
> > + ASSERT(0);
> > + return VM_FAULT_SIGBUS;
>
> Does this actually work if FS_DAX=n? AFAICT there's no !DAX stub for
> dax_iomap_fault, so won't that cause a linker error?

IS_ENABLED expands to a compile time constant, so the compiler eliminates
the call and no stub is needed.