mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* re: ext4: convert file system to meta_bg if needed during resizing
@ 2020-02-29  0:39 Colin Ian King
  2020-02-29 17:42 ` Theodore Y. Ts'o
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Ian King @ 2020-02-29  0:39 UTC (permalink / raw)
  To: Theodore Ts'o, Andreas Dilger, Ext4 Developers List; +Cc: linux-kernel

Hi,

static analysis with Coverity has found an issue in function
ext4_convert_meta_bg() with the following commit

commit 1c6bd7173d66b3dfdefcedb38cabc1fb03997509
Author: Theodore Ts'o <tytso@mit.edu>
Date:   Thu Sep 13 10:19:24 2012 -0400

    ext4: convert file system to meta_bg if needed during resizing

The analysis is as follows:

1898
1899 errout:
1900        ret = ext4_journal_stop(handle);
1901        if (!err)

Unused value (UNUSED_VALUE)assigned_value: Assigning value from ret to
err here, but that stored value is not used.

1902                err = ret;
1903        return ret;

I'm not entirely sure why !err is being checked and then err is being
re-assigned and then is not used.

Colin

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

* Re: ext4: convert file system to meta_bg if needed during resizing
  2020-02-29  0:39 ext4: convert file system to meta_bg if needed during resizing Colin Ian King
@ 2020-02-29 17:42 ` Theodore Y. Ts'o
  2020-02-29 17:52   ` Colin Ian King
  0 siblings, 1 reply; 3+ messages in thread
From: Theodore Y. Ts'o @ 2020-02-29 17:42 UTC (permalink / raw)
  To: Colin Ian King; +Cc: Andreas Dilger, Ext4 Developers List, linux-kernel

On Sat, Feb 29, 2020 at 12:39:34AM +0000, Colin Ian King wrote:
> Hi,
> 
> static analysis with Coverity has found an issue in function
> ext4_convert_meta_bg() with the following commit
> 
> commit 1c6bd7173d66b3dfdefcedb38cabc1fb03997509
> Author: Theodore Ts'o <tytso@mit.edu>
> Date:   Thu Sep 13 10:19:24 2012 -0400
> 
>     ext4: convert file system to meta_bg if needed during resizing
> 
> The analysis is as follows:
> 
> 1898
> 1899 errout:
> 1900        ret = ext4_journal_stop(handle);
> 1901        if (!err)
> 
> Unused value (UNUSED_VALUE)assigned_value: Assigning value from ret to
> err here, but that stored value is not used.
> 
> 1902                err = ret;
> 1903        return ret;

Line 1903 should be "return err".

Want to send a patch, or shall I just commit the fix?

     	       	      	       	      - Ted

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

* Re: ext4: convert file system to meta_bg if needed during resizing
  2020-02-29 17:42 ` Theodore Y. Ts'o
@ 2020-02-29 17:52   ` Colin Ian King
  0 siblings, 0 replies; 3+ messages in thread
From: Colin Ian King @ 2020-02-29 17:52 UTC (permalink / raw)
  To: Theodore Y. Ts'o; +Cc: Andreas Dilger, Ext4 Developers List, linux-kernel

On 29/02/2020 17:42, Theodore Y. Ts'o wrote:
> On Sat, Feb 29, 2020 at 12:39:34AM +0000, Colin Ian King wrote:
>> Hi,
>>
>> static analysis with Coverity has found an issue in function
>> ext4_convert_meta_bg() with the following commit
>>
>> commit 1c6bd7173d66b3dfdefcedb38cabc1fb03997509
>> Author: Theodore Ts'o <tytso@mit.edu>
>> Date:   Thu Sep 13 10:19:24 2012 -0400
>>
>>     ext4: convert file system to meta_bg if needed during resizing
>>
>> The analysis is as follows:
>>
>> 1898
>> 1899 errout:
>> 1900        ret = ext4_journal_stop(handle);
>> 1901        if (!err)
>>
>> Unused value (UNUSED_VALUE)assigned_value: Assigning value from ret to
>> err here, but that stored value is not used.
>>
>> 1902                err = ret;
>> 1903        return ret;
> 
> Line 1903 should be "return err".
> 
> Want to send a patch, or shall I just commit the fix?
> 
>      	       	      	       	      - Ted
> 
I don't mind if you commit the fix, I wasn't sure what the appropriate
fix was, so I kudos to you Ted for that.

Colin




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

end of thread, other threads:[~2020-02-29 17:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-29  0:39 ext4: convert file system to meta_bg if needed during resizing Colin Ian King
2020-02-29 17:42 ` Theodore Y. Ts'o
2020-02-29 17:52   ` Colin Ian King

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®