All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
To: Kari Argillander <kari.argillander@gmail.com>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: <ntfs3@lists.linux.dev>, <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH 1/2] fs/ntfs3: Remove a useless test in 'indx_find()'
Date: Thu, 23 Sep 2021 19:11:29 +0300	[thread overview]
Message-ID: <fbc33faa-5eec-527c-3c78-4966a5480f44@paragon-software.com> (raw)
In-Reply-To: <20210921213955.se7svkfr62xndnlc@kari-VirtualBox>



On 22.09.2021 00:39, Kari Argillander wrote:
> On Sat, Sep 18, 2021 at 09:56:19PM +0200, Christophe JAILLET wrote:
>> 'fnd' has been dereferenced several time before, so testing it here is
>> pointless.
>> Moreover, all callers of 'indx_find()' already have some error handling
>> code that makes sure that no NULL 'fnd' is passed.
>>
>> So, remove the useless test.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> Seems correct, thanks.
> 
> Reviewed-by: Kari Argillander <kari.argillander@gmail.com>
> 
>> ---
>>  fs/ntfs3/index.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
>> index 4f71a91f07d9..6f81e3a49abf 100644
>> --- a/fs/ntfs3/index.c
>> +++ b/fs/ntfs3/index.c
>> @@ -1072,9 +1072,7 @@ int indx_find(struct ntfs_index *indx, struct ntfs_inode *ni,
>>  	if (!e)
>>  		return -EINVAL;
>>  
>> -	if (fnd)
>> -		fnd->root_de = e;
>> -
>> +	fnd->root_de = e;
>>  	err = 0;
>>  
>>  	for (;;) {
>> -- 
>> 2.30.2
>>

Thanks for work - applied!

      reply	other threads:[~2021-09-23 16:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-18 19:56 [PATCH 1/2] fs/ntfs3: Remove a useless test in 'indx_find()' Christophe JAILLET
2021-09-18 19:56 ` [PATCH 2/2] fs/ntfs3: Remove a useless shadowing variable Christophe JAILLET
2021-09-21 21:41   ` Kari Argillander
2021-09-21 21:39 ` [PATCH 1/2] fs/ntfs3: Remove a useless test in 'indx_find()' Kari Argillander
2021-09-23 16:11   ` Konstantin Komarov [this message]

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=fbc33faa-5eec-527c-3c78-4966a5480f44@paragon-software.com \
    --to=almaz.alexandrovich@paragon-software.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=kari.argillander@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.