[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200120094608.GN18451@dhcp22.suse.cz>
Date: Mon, 20 Jan 2020 10:46:08 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Wei Yang <richardw.yang@...ux.intel.com>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, yang.shi@...ux.alibaba.com
Subject: Re: [PATCH 3/8] mm/migrate.c: reform the last call on
do_move_pages_to_node()
On Sun 19-01-20 11:06:31, Wei Yang wrote:
> No functional change, just reform it to make it as the same shape as
> other calls on do_move_pages_to_node().
>
> This is a preparation for further cleanup.
>
> Signed-off-by: Wei Yang <richardw.yang@...ux.intel.com>
> ---
> mm/migrate.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/mm/migrate.c b/mm/migrate.c
> index c3ef70de5876..4a63fb8fbb6d 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -1675,8 +1675,12 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,
>
> /* Make sure we do not overwrite the existing error */
> err1 = do_move_pages_to_node(mm, &pagelist, current_node);
> - if (!err1)
> - err1 = store_status(status, start, current_node, i - start);
> + if (err1) {
> + if (err >= 0)
> + err = err1;
> + goto out;
> + }
> + err1 = store_status(status, start, current_node, i - start);
Please don't. This just makes the code harder to follow. The current err
and err1 is already quite ugly so do not make it more so.
> if (err >= 0)
> err = err1;
> out:
> --
> 2.17.1
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists