aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/pagemap.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2019-07-11 20:54:59 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-12 11:05:43 -0700
commitf445884562dd8bc51eb4136bd21f014403d1813d (patch)
treecbf1bd9a8b00bb8251051f619ee90324db18e299 /include/linux/pagemap.h
parentmm: remove the exporting of totalram_pages (diff)
downloadwireguard-linux-f445884562dd8bc51eb4136bd21f014403d1813d.tar.xz
wireguard-linux-f445884562dd8bc51eb4136bd21f014403d1813d.zip
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/linux/pagemap.h')
-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);