mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Roman Demidov <roman.demidov@red-soft.ru>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>,
	ocfs2-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
	lvc-project@linuxtesting.org
Subject: Re: [PATCH] ocfs2: Remove redundant NULL check for rec variable
Date: Fri, 31 Jul 2026 08:44:58 +0800	[thread overview]
Message-ID: <a62a1071-4134-4bd6-b4fe-5b4f278037a9@linux.alibaba.com> (raw)
In-Reply-To: <20260730131507.26636-1-roman.demidov@red-soft.ru>



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@red-soft.ru>

Reviewed-by: Joseph Qi <joseph.qi@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 {


  reply	other threads:[~2026-07-31  0:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 13:15 Roman Demidov
2026-07-31  0:44 ` Joseph Qi [this message]
2026-07-31  1:41   ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a62a1071-4134-4bd6-b4fe-5b4f278037a9@linux.alibaba.com \
    --to=joseph.qi@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=jlbec@evilplan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=mark@fasheh.com \
    --cc=ocfs2-devel@lists.linux.dev \
    --cc=roman.demidov@red-soft.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®