fbdev/deferred-io: Clean up pageref on lastclose
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 19 Apr 2024 08:28:56 +0000 (10:28 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 2 May 2024 09:33:13 +0000 (11:33 +0200)
commit28aea43c705af174b98d01d299bb189c2ccbe085
treeb215aa6d3bcb43720c0bd52c8c5e4542e8b01b99
parent757a2713761fa90bb8f57cba231a3e7259944463
fbdev/deferred-io: Clean up pageref on lastclose

Clean up the pageref state as part of the lastclose helper. This
only requires to clear the page's mapping field. The pageref and
page can stay in place for the next opened instance of the frame-
buffer file.

With the change in the clean-up logic, there's no further need
to look up pages during the lastclose cleanup. The code instead
uses the existing pagerefs in its look-up table. It also avoids
using smem_len, which some driver might not set correctly.

v2:
- fix typos in commit message (Javier)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-4-tzimmermann@suse.de
drivers/video/fbdev/core/fb_defio.c