[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250228081126.2634480-1-sunjunchao2870@gmail.com>
Date: Fri, 28 Feb 2025 16:11:26 +0800
From: Julian Sun <sunjunchao2870@...il.com>
To: linux-ext4@...r.kernel.org
Cc: tytso@....edu,
adilger.kernel@...ger.ca,
jack@...e.cz,
Julian Sun <sunjunchao2870@...il.com>
Subject: [PATCH] ext4: remove unnecessary checks for __GFP_NOFAIL allocation.
The __GFP_NOFAIL flag ensures that allocation will not fail.
So remove the unnecessary checks.
Signed-off-by: Julian Sun <sunjunchao2870@...il.com>
---
fs/ext4/extents.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index a07a98a4b97a..95debd5d6506 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2940,10 +2940,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.5
Powered by blists - more mailing lists