[PATCH v3 13/16] /dev/mem: Only set filp->f_mapping

Dan Williams dan.j.williams at intel.com
Wed Oct 21 18:21:17 UTC 2020


On Wed, Oct 21, 2020 at 1:57 AM Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
>
> When we care about pagecache maintenance, we need to make sure that
> both f_mapping and i_mapping point at the right mapping.
>
> But for iomem mappings we only care about the virtual/pte side of
> things, so f_mapping is enough. Also setting inode->i_mapping was
> confusing me as a driver maintainer, since in e.g. drivers/gpu we
> don't do that. Per Dan this seems to be copypasta from places which do
> care about pagecache consistency, but not needed. Hence remove it for
> slightly less confusion.
>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> Cc: Jason Gunthorpe <jgg at ziepe.ca>
> Cc: Kees Cook <keescook at chromium.org>
> Cc: Dan Williams <dan.j.williams at intel.com>
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Cc: John Hubbard <jhubbard at nvidia.com>
> Cc: Jérôme Glisse <jglisse at redhat.com>
> Cc: Jan Kara <jack at suse.cz>
> Cc: Dan Williams <dan.j.williams at intel.com>

Reviewed-by: Dan Williams <dan.j.williams at intel.com>


More information about the dri-devel mailing list