Re: [PATCH v2 1/6] mm: get_user_pages: consolidate error handling

From
John Hubbard <jhubbard@nvidia.com>
Date
2018-07-02 21:34:48
Also in
linux-fsdevel, linux-mm, lkml
Reply to
Jan Kara, 2018-07-02
On 07/02/2018 03:17 AM, Jan Kara wrote:
On Sun 01-07-18 17:56:49, john.hubbard@gmail.com wrote:
quoted
From: John Hubbard <jhubbard@nvidia.com>

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.

Signed-off-by: John Hubbard <jhubbard@nvidia.com>
This looks nice! You can add:

Reviewed-by: Jan Kara <jack@suse.cz>
Great, thanks for the review!

-- 
John Hubbard
NVIDIA
Thread (30 messages) 30 messages, 5 authors, last reply 2018-07-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help