[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201221193821.GF874@casper.infradead.org>
Date: Mon, 21 Dec 2020 19:38:21 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Mike Kravetz <mike.kravetz@...cle.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
David Hildenbrand <david@...hat.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
Michal Hocko <mhocko@...nel.org>,
Davidlohr Bueso <dave@...olabs.net>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/2] mm/hugetlb: change hugetlb_reserve_pages() to type
bool
On Mon, Dec 21, 2020 at 11:25:41AM -0800, Mike Kravetz wrote:
> While reviewing a bug in hugetlb_reserve_pages, it was noticed that all
> callers ignore the return value. Any failure is considered an ENOMEM
> error by the callers.
>
> Change the function to be of type bool. The function will return true
> if the reservation was successful, false otherwise. Callers currently
> assume a zero return code indicates success. Change the callers to look
> for true to indicate success. No functional change, only code cleanup.
>
> Signed-off-by: Mike Kravetz <mike.kravetz@...cle.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@...radead.org>
Powered by blists - more mailing lists