From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 8 Oct 2018 17:05:25 -0700 From: Andrew Morton To: john.hubbard@gmail.com Cc: Matthew Wilcox , Michal Hocko , Christopher Lameter , Jason Gunthorpe , Dan Williams , Jan Kara , linux-mm@kvack.org, LKML , linux-rdma , linux-fsdevel@vger.kernel.org, John Hubbard Subject: Re: [PATCH v4 1/3] mm: get_user_pages: consolidate error handling Message-Id: <20181008170525.62d1a910f7811d7c66a8c34c@linux-foundation.org> In-Reply-To: <20181008211623.30796-2-jhubbard@nvidia.com> References: <20181008211623.30796-1-jhubbard@nvidia.com> <20181008211623.30796-2-jhubbard@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: On Mon, 8 Oct 2018 14:16:21 -0700 john.hubbard@gmail.com wrote: > An upcoming patch requires a way to operate on each page that > any of the get_user_pages_*() variants returns. > > In preparation for that, consolidate the error handling for > __get_user_pages(). This provides a single location (the "out:" label) > for operating on the collected set of pages that are about to be returned. > > As long every use of the "ret" variable is being edited, rename > "ret" --> "err", so that its name matches its true role. > This also gets rid of two shadowed variable declarations, as a > tiny beneficial a side effect. Reviewed-by: Andrew Morton `i' is a pretty crappy identifier as well, but we'll live.