On Mon, Jun 28, 2021 at 3:12 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > > On Fri, Jun 25, 2021 at 11:31:17PM +0000, Krzysztof Wilczy??ski wrote: > > if (battr->mapping) > > - of->file->f_mapping = battr->mapping; > > + of->file->f_mapping = battr->mapping(); > > I think get_mapping() is a better name now. That being said this > whole programming model looks a little weird. I think both those points are fair. > Also, does this patch imply the mapping field of the sysfs bin > attributes wasn't used before at all? It defaulted to an address_space per file rather than a shared address space across all files that map physical addresses as file offsets.