From: Al Viro <viro@zeniv.linux.org.uk>
To: David Howells <dhowells@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
John Hubbard <jhubbard@nvidia.com>,
Matthew Wilcox <willy@infradead.org>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
Christoph Hellwig <hch@infradead.org>,
Jens Axboe <axboe@kernel.dk>, Jan Kara <jack@suse.cz>,
Jeff Layton <jlayton@kernel.org>,
Logan Gunthorpe <logang@deltatee.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 4/9] iov_iter: Add a function to extract a page list from an iterator
Date: Thu, 12 Jan 2023 21:15:50 +0000 [thread overview]
Message-ID: <Y8B4hpF5czsk7pK1@ZenIV> (raw)
In-Reply-To: <167344728530.2425628.9613910866466387722.stgit@warthog.procyon.org.uk>
On Wed, Jan 11, 2023 at 02:28:05PM +0000, David Howells wrote:
> +ssize_t iov_iter_extract_pages(struct iov_iter *i,
> + struct page ***pages,
> + size_t maxsize,
> + unsigned int maxpages,
> + unsigned int gup_flags,
> + size_t *offset0,
> + unsigned int *cleanup_mode)
This cleanup_mode thing is wrong. It's literally a trivial
function of ->user_backed and ->data_source - we don't
even need to look at the ->type.
Separate it into an inline helper and be done with that;
don't carry it all over the place.
It's really "if not user-backed => 0, otherwise it's FOLL_PIN or FOLL_GET,
depending upon the direction".
next prev parent reply other threads:[~2023-01-12 21:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 14:27 [PATCH v5 0/9] iov_iter: Add extraction helpers David Howells
2023-01-11 14:28 ` [PATCH v5 4/9] iov_iter: Add a function to extract a page list from an iterator David Howells
2023-01-12 7:55 ` Christoph Hellwig
2023-01-12 21:15 ` Al Viro [this message]
2023-01-12 21:36 ` Al Viro
2023-01-13 5:26 ` Christoph Hellwig
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=Y8B4hpF5czsk7pK1@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=axboe@kernel.dk \
--cc=dhowells@redhat.com \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=jhubbard@nvidia.com \
--cc=jlayton@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=logang@deltatee.com \
--cc=willy@infradead.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