aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <[email protected]>2019-07-11 20:54:59 -0700
committerLinus Torvalds <[email protected]>2019-07-12 11:05:43 -0700
commitf445884562dd8bc51eb4136bd21f014403d1813d (patch)
treecbf1bd9a8b00bb8251051f619ee90324db18e299
parent98ef2046f28b642ad35935972a173194ea58a21d (diff)
include/linux/pagemap.h: document trylock_page() return value
Cc: Henry Burns <[email protected]> Cc: Jonathan Adams <[email protected]> Cc: David Rientjes <[email protected]> Cc: Mike Rapoport <[email protected]> Cc: Vitaly Wool <[email protected]> Cc: Xidong Wang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--include/linux/pagemap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index fe0b29bf2df7..6fd0d3aa492c 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -452,6 +452,9 @@ extern int __lock_page_or_retry(struct page *page, struct mm_struct *mm,
unsigned int flags);
extern void unlock_page(struct page *page);
+/*
+ * Return true if the page was successfully locked
+ */
static inline int trylock_page(struct page *page)
{
page = compound_head(page);