Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iomap: remove set_memor_ro() on zero page

Stephen reported a boot failure on ppc power8 system where
set_memor_ro() on the new zero page failed [0]. Christophe Leroy
further clarifies we can't use this on on linear memory on ppc, and
so instead of special casing this just for PowerPC [2] remove the
call as suggested by Darrick.

[0] https://lore.kernel.org/all/20240826175931.1989f99e@canb.auug.org.au/T/#u
[1] https://lore.kernel.org/all/b0fe75b4-c1bb-47f7-a7c3-2534b31c1780@csgroup.eu/
[2] https://lore.kernel.org/all/ZszrJkFOpiy5rCma@bombadil.infradead.org/

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Suggested-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20240826212632.2098685-1-mcgrof@kernel.org
Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Luis Chamberlain and committed by
Christian Brauner
d1dd75dc 7ccd606b

-3
-3
fs/iomap/direct-io.c
··· 11 11 #include <linux/iomap.h> 12 12 #include <linux/backing-dev.h> 13 13 #include <linux/uio.h> 14 - #include <linux/set_memory.h> 15 14 #include <linux/task_io_accounting_ops.h> 16 15 #include "trace.h" 17 16 ··· 780 781 if (!zero_page) 781 782 return -ENOMEM; 782 783 783 - set_memory_ro((unsigned long)page_address(zero_page), 784 - 1U << IOMAP_ZERO_PAGE_ORDER); 785 784 return 0; 786 785 } 787 786 fs_initcall(iomap_dio_init);