On Fri, Jun 25, 2021 at 4:31 PM Krzysztof Wilczyński <kw@xxxxxxxxx> wrote: > > Defer invocation of the iomem_get_mapping() to the sysfs open callback > so that it can be executed as needed when the binary sysfs object has > been accessed. > > To do that, convert the "mapping" member of the struct bin_attribute > from a pointer to the struct address_space into a function pointer with > a signature that requires the same return type, and then updates the > sysfs_kf_bin_open() to invoke provided function should the function > pointer be valid. > > Thus, this change removes the need for the fs_initcalls to complete > before any other sub-system that uses the iomem_get_mapping() would be > able to invoke it safely without leading to a failure and an Oops > related to an invalid iomem_get_mapping() access. > > Co-authored-by: Dan Williams <dan.j.williams@xxxxxxxxx> Go ahead and replace this with: Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>