summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2019-07-12 06:54:59 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-12 21:05:43 +0300
commitf445884562dd8bc51eb4136bd21f014403d1813d (patch)
treecbf1bd9a8b00bb8251051f619ee90324db18e299 /include
parent98ef2046f28b642ad35935972a173194ea58a21d (diff)
downloadlinux-f445884562dd8bc51eb4136bd21f014403d1813d.tar.xz
include/linux/pagemap.h: document trylock_page() return value
Cc: Henry Burns <henryburns@google.com> Cc: Jonathan Adams <jwadams@google.com> Cc: David Rientjes <rientjes@google.com> Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> Cc: Vitaly Wool <vitalywool@gmail.com> Cc: Xidong Wang <wangxidong_97@163.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-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);