> +/* Discard pages backing a range of the xfile. */ > +void > +xfile_discard( > + struct xfile *xf, > + loff_t pos, > + u64 count) > +{ > + trace_xfile_discard(xf, pos, count); > + > + shmem_truncate_range(file_inode(xf->file), pos, pos + count - 1); > +} Can you split this xfile infrastructure addition into a separate patch instead of hiding it here? Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>