[PATCH] fs/sysv: Don't round down address for kunmap_flush_on_unmap()

From: Fabio M. De Francesco
Date: Mon Mar 06 2023 - 07:52:01 EST


The kernel virtual address passed to kunmap_flush_on_unmap() has no more
any need to be rounded down.

Therefore, delete the rounding down of "page_addr" when passed to
kunmap_local() in dir_put_page().

Don't backport without commit 88d7b12068b9 ("highmem: round down the
address passed to kunmap_flush_on_unmap()").

Cc: Ira Weiny <ira.weiny@xxxxxxxxx>
Suggested-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@xxxxxxxxx>
---
fs/sysv/dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/sysv/dir.c b/fs/sysv/dir.c
index 999bceb99974..e2d26eb78af7 100644
--- a/fs/sysv/dir.c
+++ b/fs/sysv/dir.c
@@ -30,7 +30,7 @@ const struct file_operations sysv_dir_operations = {

inline void dir_put_page(struct page *page, void *page_addr)
{
- kunmap_local((void *)((unsigned long)page_addr & PAGE_MASK));
+ kunmap_local(page_addr);
put_page(page);
}

--
2.39.2