All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/pagemap: Make trylock_page return bool
@ 2024-04-28  1:47 Hao Ge
  0 siblings, 0 replies; only message in thread
From: Hao Ge @ 2024-04-28  1:47 UTC (permalink / raw)
  To: willy, akpm; +Cc: linux-fsdevel, linux-mm, linux-kernel, gehao618, Hao Ge

Make trylock_page return bool to align the return values of
folio_trylock function and it also corresponds to its comment.

Signed-off-by: Hao Ge <gehao@kylinos.cn>
---
 include/linux/pagemap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 2df35e65557d..d8e2f7e0f66f 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -1014,7 +1014,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));
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-28  1:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-28  1:47 [PATCH] mm/pagemap: Make trylock_page return bool Hao Ge

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.