All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hao Ge <gehao@kylinos.cn>
To: willy@infradead.org, akpm@linux-foundation.org
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, gehao618@163.com,
	Hao Ge <gehao@kylinos.cn>
Subject: [PATCH] mm/pagemap: Make trylock_page return bool
Date: Sun, 28 Apr 2024 09:47:11 +0800	[thread overview]
Message-ID: <20240428014711.11169-1-gehao@kylinos.cn> (raw)

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


                 reply	other threads:[~2024-04-28  1:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240428014711.11169-1-gehao@kylinos.cn \
    --to=gehao@kylinos.cn \
    --cc=akpm@linux-foundation.org \
    --cc=gehao618@163.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.