[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190723055359.GC17148@lst.de>
Date: Tue, 23 Jul 2019 07:53:59 +0200
From: Christoph Hellwig <hch@....de>
To: john.hubbard@...il.com
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Björn Töpel <bjorn.topel@...el.com>,
Boaz Harrosh <boaz@...xistor.com>,
Christoph Hellwig <hch@....de>,
Daniel Vetter <daniel@...ll.ch>,
Dan Williams <dan.j.williams@...el.com>,
Dave Chinner <david@...morbit.com>,
David Airlie <airlied@...ux.ie>,
"David S . Miller" <davem@...emloft.net>,
Ilya Dryomov <idryomov@...il.com>, Jan Kara <jack@...e.cz>,
Jason Gunthorpe <jgg@...pe.ca>, Jens Axboe <axboe@...nel.dk>,
Jérôme Glisse <jglisse@...hat.com>,
Johannes Thumshirn <jthumshirn@...e.de>,
Magnus Karlsson <magnus.karlsson@...el.com>,
Matthew Wilcox <willy@...radead.org>,
Miklos Szeredi <miklos@...redi.hu>,
Ming Lei <ming.lei@...hat.com>, Sage Weil <sage@...hat.com>,
Santosh Shilimkar <santosh.shilimkar@...cle.com>,
Yan Zheng <zyan@...hat.com>, netdev@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linux-mm@...ck.org,
linux-rdma@...r.kernel.org, bpf@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
John Hubbard <jhubbard@...dia.com>
Subject: Re: [PATCH 1/3] mm/gup: introduce __put_user_pages()
On Mon, Jul 22, 2019 at 03:34:13PM -0700, john.hubbard@...il.com wrote:
> +enum pup_flags_t {
> + PUP_FLAGS_CLEAN = 0,
> + PUP_FLAGS_DIRTY = 1,
> + PUP_FLAGS_LOCK = 2,
> + PUP_FLAGS_DIRTY_LOCK = 3,
> +};
Well, the enum defeats the ease of just being able to pass a boolean
expression to the function, which would simplify a lot of the caller,
so if we need to support the !locked version I'd rather see that as
a separate helper.
But do we actually have callers where not using the _lock version is
not a bug? set_page_dirty makes sense in the context of a file systems
that have a reference to the inode the page hangs off, but that is
(almost?) never the case for get_user_pages.
Powered by blists - more mailing lists