All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] bcachefs: Removes NULL pointer checks for filemap_lock_folio() return values
@ 2025-06-27  1:21 Youling Tang
  2025-06-27  1:21 ` [PATCH 2/3] bcachefs: Refactor the handling logic of fallocate mode in bch2_fallocate_dispatch() Youling Tang
  2025-06-27  1:21 ` [PATCH 3/3] bcachefs: Spilt bchfs_fallocate() into two functions Youling Tang
  0 siblings, 2 replies; 3+ messages in thread
From: Youling Tang @ 2025-06-27  1:21 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: linux-bcachefs, linux-kernel, youling.tang, Youling Tang

From: Youling Tang <tangyouling@kylinos.cn>

__filemap_get_folio the return value cannot be NULL, so unnecessary checks
are removed.

Signed-off-by: Youling Tang <tangyouling@kylinos.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-27  1:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-27  1:21 [PATCH 1/3] bcachefs: Removes NULL pointer checks for filemap_lock_folio() return values Youling Tang
2025-06-27  1:21 ` [PATCH 2/3] bcachefs: Refactor the handling logic of fallocate mode in bch2_fallocate_dispatch() Youling Tang
2025-06-27  1:21 ` [PATCH 3/3] bcachefs: Spilt bchfs_fallocate() into two functions Youling Tang

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.