From 591a4ab9b8b125bf72a345ca6f5c0ee4481db02b Mon Sep 17 00:00:00 2001 From: Baolin Liu Date: Tue, 6 Jan 2026 14:20:16 +0800 Subject: [PATCH] ext4: remove redundant NULL check after __GFP_NOFAIL Remove redundant NULL check after kcalloc() with GFP_NOFS | __GFP_NOFAIL. Signed-off-by: Baolin Liu Reviewed-by: Zhang Yi Link: https://patch.msgid.link/20260106062016.154573-1-liubaolin12138@163.com Signed-off-by: Theodore Ts'o --- fs/ext4/extents.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 8597110f50efb..3c288d4b19d26 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -2949,10 +2949,6 @@ again: } else { path = kcalloc(depth + 1, sizeof(struct ext4_ext_path), GFP_NOFS | __GFP_NOFAIL); - if (path == NULL) { - ext4_journal_stop(handle); - return -ENOMEM; - } path[0].p_maxdepth = path[0].p_depth = depth; path[0].p_hdr = ext_inode_hdr(inode); i = 0; -- 2.47.3