lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <620065E5-8238-476C-A9B5-1B5B1AD298B0@tuxera.com>
Date:	Sat, 4 Jul 2015 10:36:57 +0000
From:	Anton Altaparmakov <anton@...era.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	"linux-ntfs-dev@...ts.sourceforge.net" 
	<linux-ntfs-dev@...ts.sourceforge.net>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
	Julia Lawall <julia.lawall@...6.fr>,
	"SF Markus Elfring" <elfring@...rs.sourceforge.net>
Subject: Re: [PATCH] ntfs: Deletion of unnecessary checks before the
 function call "iput"

Hi Andrew,

Can you please take up this trivial patch and merge it upstream?

Reviewed-by: Anton Altaparmakov <anton@...era.com>

Thanks a lot in advance!

Best regards,

	Anton

> On 4 Jul 2015, at 11:32, SF Markus Elfring <elfring@...rs.sourceforge.net> wrote:
> 
>> From: Markus Elfring <elfring@...rs.sourceforge.net>
>> Date: Sat, 15 Nov 2014 19:35:05 +0100
>> 
>> The iput() function tests whether its argument is NULL and then
>> returns immediately. Thus the test around the call is not needed.
>> 
>> This issue was detected by using the Coccinelle software.
>> 
>> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
>> ---
>> fs/ntfs/super.c | 21 +++++++--------------
>> 1 file changed, 7 insertions(+), 14 deletions(-)
>> 
>> diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c
>> index 6c3296e..8f22a47 100644
>> --- a/fs/ntfs/super.c
>> +++ b/fs/ntfs/super.c
>> @@ -2204,17 +2204,12 @@ get_ctx_vol_failed:
>> 	return true;
>> #ifdef NTFS_RW
>> iput_usnjrnl_err_out:
>> -	if (vol->usnjrnl_j_ino)
>> -		iput(vol->usnjrnl_j_ino);
>> -	if (vol->usnjrnl_max_ino)
>> -		iput(vol->usnjrnl_max_ino);
>> -	if (vol->usnjrnl_ino)
>> -		iput(vol->usnjrnl_ino);
>> +	iput(vol->usnjrnl_j_ino);
>> +	iput(vol->usnjrnl_max_ino);
>> +	iput(vol->usnjrnl_ino);
>> iput_quota_err_out:
>> -	if (vol->quota_q_ino)
>> -		iput(vol->quota_q_ino);
>> -	if (vol->quota_ino)
>> -		iput(vol->quota_ino);
>> +	iput(vol->quota_q_ino);
>> +	iput(vol->quota_ino);
>> 	iput(vol->extend_ino);
>> #endif /* NTFS_RW */
>> iput_sec_err_out:
>> @@ -2223,8 +2218,7 @@ iput_root_err_out:
>> 	iput(vol->root_ino);
>> iput_logfile_err_out:
>> #ifdef NTFS_RW
>> -	if (vol->logfile_ino)
>> -		iput(vol->logfile_ino);
>> +	iput(vol->logfile_ino);
>> iput_vol_err_out:
>> #endif /* NTFS_RW */
>> 	iput(vol->vol_ino);
>> @@ -2254,8 +2248,7 @@ iput_mftbmp_err_out:
>> 	iput(vol->mftbmp_ino);
>> iput_mirr_err_out:
>> #ifdef NTFS_RW
>> -	if (vol->mftmirr_ino)
>> -		iput(vol->mftmirr_ino);
>> +	iput(vol->mftmirr_ino);
>> #endif /* NTFS_RW */
>> 	return false;
>> }
>> 
> 
> Would you like to integrate this update suggestion
> into another source code repository?
> 
> Regards,
> Markus

-- 
Anton Altaparmakov <anton at tuxera.com> (replace at with @)
Lead in File System Development, Tuxera Inc., http://www.tuxera.com/
Linux NTFS maintainer

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ