[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20260106062016.154573-1-liubaolin12138@163.com>
Date: Tue, 6 Jan 2026 14:20:16 +0800
From: Baolin Liu <liubaolin12138@....com>
To: tytso@....edu,
adilger.kernel@...ger.ca
Cc: linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org,
Baolin Liu <liubaolin@...inos.cn>
Subject: [PATCH v1] ext4: Remove redundant NULL check after __GFP_NOFAIL
From: Baolin Liu <liubaolin@...inos.cn>
Remove redundant NULL check after kcalloc() with GFP_NOFS | __GFP_NOFAIL.
Signed-off-by: Baolin Liu <liubaolin@...inos.cn>
---
fs/ext4/extents.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 2cf5759ba689..0bee702ca663 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2944,10 +2944,6 @@ int ext4_ext_remove_space(struct inode *inode, ext4_lblk_t start,
} 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.39.2
Powered by blists - more mailing lists