[lvc-project] [PATCH] ocfs2: Remove redundant NULL check for rec variable

Joseph Qi joseph.qi at linux.alibaba.com
Fri Jul 31 03:44:58 MSK 2026



On 7/30/26 9:15 PM, Roman Demidov wrote:
> The rec variable will contain the address of the structure array element,
> i.e., the address of the ocfs2_chain_rec structure.
> This address cannot be NULL.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Signed-off-by: Roman Demidov <roman.demidov at red-soft.ru>

Reviewed-by: Joseph Qi <joseph.qi at linux.alibaba.com>
> ---
>  fs/ocfs2/move_extents.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c
> index ad1678ee7cc4..b546c7371e28 100644
> --- a/fs/ocfs2/move_extents.c
> +++ b/fs/ocfs2/move_extents.c
> @@ -415,9 +415,6 @@ static int ocfs2_find_victim_alloc_group(struct inode *inode,
>  	for (i = 0; i < le16_to_cpu(cl->cl_next_free_rec); i++) {
>  
>  		rec = &(cl->cl_recs[i]);
> -		if (!rec)
> -			continue;
> -
>  		bg = NULL;
>  
>  		do {




More information about the lvc-project mailing list