mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] xfs: Remove redundant NULL check after __GFP_NOFAIL
@ 2026-03-03  3:33 hongao
  2026-03-03 14:41 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: hongao @ 2026-03-03  3:33 UTC (permalink / raw)
  To: cem, djwong, sandeen; +Cc: linux-xfs, linux-kernel, hongao

Remove redundant NULL check after kzalloc() with GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_NOFAIL.

Signed-off-by: hongao <hongao@uniontech.com>

diff --git a/fs/xfs/libxfs/xfs_da_btree.c b/fs/xfs/libxfs/xfs_da_btree.c
index 766631f0562e..f76dfc8f4e1a 100644
--- a/fs/xfs/libxfs/xfs_da_btree.c
+++ b/fs/xfs/libxfs/xfs_da_btree.c
@@ -2718,10 +2718,6 @@ xfs_dabuf_map(
 	if (nirecs > 1) {
 		map = kzalloc(nirecs * sizeof(struct xfs_buf_map),
 				GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_NOFAIL);
-		if (!map) {
-			error = -ENOMEM;
-			goto out_free_irecs;
-		}
 		*mapp = map;
 	}
 
-- 
2.51.0


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

end of thread, other threads:[~2026-03-05  9:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-03  3:33 [PATCH] xfs: Remove redundant NULL check after __GFP_NOFAIL hongao
2026-03-03 14:41 ` Christoph Hellwig
2026-03-04  9:50 ` Carlos Maiolino
2026-03-04 11:29 ` [PATCH v2] " hongao
2026-03-04 13:20   ` Christoph Hellwig
2026-03-05  9:47   ` Carlos Maiolino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®