Commit 591a4ab9 authored by Baolin Liu's avatar Baolin Liu Committed by Theodore Ts'o
Browse files

ext4: remove redundant NULL check after __GFP_NOFAIL



Remove redundant NULL check after kcalloc() with GFP_NOFS | __GFP_NOFAIL.

Signed-off-by: default avatarBaolin Liu <liubaolin@kylinos.cn>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20260106062016.154573-1-liubaolin12138@163.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 5f18f60d
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -2949,10 +2949,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;