From: Hao Ge Date: Sun, 28 Apr 2024 01:47:11 +0000 (+0800) Subject: mm/pagemap: make trylock_page return bool X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=620875560bd65084a8bfcea6899003d6a29ddc57;p=linux.git mm/pagemap: make trylock_page return bool Make trylock_page return bool to align the return values of folio_trylock function and it also corresponds to its comment. Link: https://lkml.kernel.org/r/20240428014711.11169-1-gehao@kylinos.cn Signed-off-by: Hao Ge Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton --- diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 2a0bc2ff52583..850d32057939d 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -1012,7 +1012,7 @@ static inline bool folio_trylock(struct folio *folio) /* * Return true if the page was successfully locked */ -static inline int trylock_page(struct page *page) +static inline bool trylock_page(struct page *page) { return folio_trylock(page_folio(page)); }