if (unlikely(!in->f_op->splice_read))
return warn_unsupported(in, "read");
/*
- * O_DIRECT doesn't deal with the pagecache, so we allocate a buffer,
- * copy into it and splice that into the pipe.
+ * O_DIRECT and DAX don't deal with the pagecache, so we allocate a
+ * buffer, copy into it and splice that into the pipe.
*/
- if ((in->f_flags & O_DIRECT))
+ if ((in->f_flags & O_DIRECT) || IS_DAX(in->f_mapping->host))
return copy_splice_read(in, ppos, pipe, len, flags);
return in->f_op->splice_read(in, ppos, pipe, len, flags);
}