[PATCH v20 05/32] splice: Make splice from a DAX file use direct_splice_read()

David Howells dhowells at redhat.com
Fri May 19 18:48:47 AEST 2023


Christoph Hellwig <hch at infradead.org> 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



More information about the Linux-erofs mailing list