Re: [PATCH] f2fs: Use memcpy_page() in f2fs_copy_page()

From: Fabio M. De Francesco
Date: Sun Jul 17 2022 - 04:45:07 EST


On domenica 17 luglio 2022 08:55:20 CEST Christoph Hellwig wrote:
> On Sat, Jul 16, 2022 at 10:43:53PM +0200, Fabio M. De Francesco wrote:
> > static inline void f2fs_copy_page(struct page *src, struct page *dst)
> > {
> > - char *src_kaddr = kmap(src);
> > - char *dst_kaddr = kmap(dst);
> >
> > - memcpy(dst_kaddr, src_kaddr, PAGE_SIZE);
> > - kunmap(dst);
> > - kunmap(src);
> > + memcpy_page(dst, 0, src, 0, PAGE_SIZE);
>
> Please remove f2fs_copy_page entirely and open code this in the only
> caller.
>
I've changed the subject of the new patch, therefore we won't have a second
version of this:

"f2fs: Delete f2fs_copy_page() and replace with memcpy_page()" is at
https://lore.kernel.org/lkml/20220717083613.3861-1-fmdefrancesco@xxxxxxxxx/

Thanks for your suggestion,

Fabio