lkml.org 
[lkml]   [2024]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm/pagemap: Make trylock_page return bool
Date
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

\
 
 \ /
  Last update: 2024-04-28 03:47    [W:0.031 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site