All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	Nick Terrell <terrelln@fb.com>, Jaegeuk Kim <jaegeuk@kernel.org>,
	Ira Weiny <ira.weiny@intel.com>
Subject: Re: [f2fs-dev] [PATCH] f2fs: Use memcpy_page() in f2fs_copy_page()
Date: Sat, 16 Jul 2022 23:55:20 -0700	[thread overview]
Message-ID: <YtOyWOKFN9ramUyb@infradead.org> (raw)
In-Reply-To: <20220716204353.22049-1-fmdefrancesco@gmail.com>

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.


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
	Nick Terrell <terrelln@fb.com>,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, Ira Weiny <ira.weiny@intel.com>
Subject: Re: [PATCH] f2fs: Use memcpy_page() in f2fs_copy_page()
Date: Sat, 16 Jul 2022 23:55:20 -0700	[thread overview]
Message-ID: <YtOyWOKFN9ramUyb@infradead.org> (raw)
In-Reply-To: <20220716204353.22049-1-fmdefrancesco@gmail.com>

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.

  reply	other threads:[~2022-07-17  6:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-16 20:43 [f2fs-dev] [PATCH] f2fs: Use memcpy_page() in f2fs_copy_page() Fabio M. De Francesco
2022-07-16 20:43 ` Fabio M. De Francesco
2022-07-17  6:55 ` Christoph Hellwig [this message]
2022-07-17  6:55   ` Christoph Hellwig
2022-07-17  8:44   ` [f2fs-dev] " Fabio M. De Francesco
2022-07-17  8:44     ` Fabio M. De Francesco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YtOyWOKFN9ramUyb@infradead.org \
    --to=hch@infradead.org \
    --cc=fmdefrancesco@gmail.com \
    --cc=ira.weiny@intel.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=terrelln@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.