The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] ocfs2: Remove redundant NULL check for rec variable
@ 2026-07-30 13:15 Roman Demidov
  2026-07-31  0:44 ` Joseph Qi
  0 siblings, 1 reply; 3+ messages in thread
From: Roman Demidov @ 2026-07-30 13:15 UTC (permalink / raw)
  To: Mark Fasheh
  Cc: Roman Demidov, Joel Becker, Joseph Qi, ocfs2-devel, linux-kernel,
	lvc-project

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>
---
 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 {
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ocfs2: Remove redundant NULL check for rec variable
  2026-07-30 13:15 [PATCH] ocfs2: Remove redundant NULL check for rec variable Roman Demidov
@ 2026-07-31  0:44 ` Joseph Qi
  2026-07-31  1:41   ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Qi @ 2026-07-31  0:44 UTC (permalink / raw)
  To: Roman Demidov, Andrew Morton
  Cc: Mark Fasheh, Joel Becker, ocfs2-devel, linux-kernel, lvc-project



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 {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ocfs2: Remove redundant NULL check for rec variable
  2026-07-31  0:44 ` Joseph Qi
@ 2026-07-31  1:41   ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2026-07-31  1:41 UTC (permalink / raw)
  To: Joseph Qi
  Cc: Roman Demidov, Mark Fasheh, Joel Becker, ocfs2-devel,
	linux-kernel, lvc-project

On Fri, 31 Jul 2026 08:44:58 +0800 Joseph Qi <joseph.qi@linux.alibaba.com> wrote:

> 
> 
> 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>

Thanks.  And thanks Roman.

But I'm afraid we aren't supposed to take patches from developers with
Russian affiliations.  Especially those which are on the OFAC list,
which appears to be the case with red-soft.ru.

https://share.google/aimode/UgHJ7ubsy9uflS1Qa
https://share.google/aimode/wpqMe0GiORkYi2meC

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-31  1:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30 13:15 [PATCH] ocfs2: Remove redundant NULL check for rec variable Roman Demidov
2026-07-31  0:44 ` Joseph Qi
2026-07-31  1:41   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox