Christoph Hellwig <[email protected]> wrote:
> On Fri, May 19, 2023 at 08:40:20AM +0100, David Howells wrote:
> > +#ifdef CONFIG_FS_DAX
> > + if (IS_DAX(in->f_mapping->host))
>
> No need for the ifdef. IS_DAX is compile-time false if CONFIG_FS_DAX
> is not set.
Ah - it's not that IS_DAX() is conditionalised, it's that S_DAX is. There's a
bunch of places that use CONFIG_FS_DAX blocks, but I guess that's because they
include calls to functions that are conditionalised out.
I wonder if the dax_iomap_rw() declaration in the header can have a non-DAX
fallback that returns an error and then we can get rid of some of the other
conditionalisation.
David