[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250627012104.222703-1-youling.tang@linux.dev>
Date: Fri, 27 Jun 2025 09:21:02 +0800
From: Youling Tang <youling.tang@...ux.dev>
To: Kent Overstreet <kent.overstreet@...ux.dev>
Cc: linux-bcachefs@...r.kernel.org,
linux-kernel@...r.kernel.org,
youling.tang@...ux.dev,
Youling Tang <tangyouling@...inos.cn>
Subject: [PATCH 1/3] bcachefs: Removes NULL pointer checks for filemap_lock_folio() return values
From: Youling Tang <tangyouling@...inos.cn>
__filemap_get_folio the return value cannot be NULL, so unnecessary checks
are removed.
Signed-off-by: Youling Tang <tangyouling@...inos.cn>
---
fs/bcachefs/fs-io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c
index dc5f713e209c..74841b1dc8ca 100644
--- a/fs/bcachefs/fs-io.c
+++ b/fs/bcachefs/fs-io.c
@@ -289,7 +289,7 @@ static int __bch2_truncate_folio(struct bch_inode_info *inode,
u64 end_pos;
folio = filemap_lock_folio(mapping, index);
- if (IS_ERR_OR_NULL(folio)) {
+ if (IS_ERR(folio)) {
/*
* XXX: we're doing two index lookups when we end up reading the
* folio
--
2.34.1
Powered by blists - more mailing lists