From: Matthew Wilcox <willy@infradead.org>
To: Souptick Joarder <jrdr.linux@gmail.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] mm/gup.c: Use gup_flags as parameter instead of passing write flag
Date: Mon, 18 May 2020 13:17:37 -0700 [thread overview]
Message-ID: <20200518201737.GV16070@bombadil.infradead.org> (raw)
In-Reply-To: <1589831903-27800-1-git-send-email-jrdr.linux@gmail.com>
On Tue, May 19, 2020 at 01:28:23AM +0530, Souptick Joarder wrote:
> The idea is to get rid of write parameter. Instead caller will pass
> FOLL_WRITE to __get_user_pages_fast(). This will not change any
> functionality of the API. Once it is upstream all the callers will
> be changed to pass FOLL_WRITE.
Uhh ... until you change all the callers, haven't you just broken all
the callers?
> -int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
> - struct page **pages)
> +int __get_user_pages_fast(unsigned long start, int nr_pages,
> + unsigned int gup_flags, struct page **pages)
> {
> unsigned long len, end;
> unsigned long flags;
> @@ -2685,10 +2692,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
> * Internally (within mm/gup.c), gup fast variants must set FOLL_GET,
> * because gup fast is always a "pin with a +1 page refcount" request.
> */
> - unsigned int gup_flags = FOLL_GET;
> -
> - if (write)
> - gup_flags |= FOLL_WRITE;
> + gup_flags |= FOLL_GET;
next prev parent reply other threads:[~2020-05-18 20:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-18 19:58 [RFC] mm/gup.c: Use gup_flags as parameter instead of passing write flag Souptick Joarder
2020-05-18 20:17 ` Matthew Wilcox [this message]
2020-05-18 20:44 ` Souptick Joarder
2020-05-18 20:45 ` John Hubbard
2020-05-18 21:06 ` Souptick Joarder
2020-05-18 21:22 ` John Hubbard
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=20200518201737.GV16070@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=jrdr.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).