From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org, gqjiang@suse.com, pawel.baldysiak@intel.com
Subject: Re: [PATCH 3/8] Grow: Grow_continue_command() remove dead code
Date: Wed, 09 Mar 2016 11:19:26 -0500 [thread overview]
Message-ID: <wrfjio0vvd2p.fsf@redhat.com> (raw)
In-Reply-To: <87fuw0lhhf.fsf@notabene.neil.brown.name> (NeilBrown's message of "Wed, 09 Mar 2016 09:42:04 +1100")
NeilBrown <neilb@suse.de> writes:
> On Wed, Mar 09 2016, Jes.Sorensen@redhat.com wrote:
>
>> From: Jes Sorensen <Jes.Sorensen@redhat.com>
>>
>> All cases where fd2 is used are completed with a close(fd2) ; fd2 = -1;
>> so there is no need to check for fd2 > -1 before exiting.
>
> In that case, you can remove all the assignments so -1 to fd2 - if you
> like.
Oh good point - I'll make that change.
Thanks,
Jes
>
> Thanks,
> NeilBrown
>
>>
>> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
>> ---
>> Grow.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/Grow.c b/Grow.c
>> index c4f417e..0fa776d 100755
>> --- a/Grow.c
>> +++ b/Grow.c
>> @@ -4924,8 +4924,6 @@ int Grow_continue_command(char *devname, int fd,
>> ret_val = Grow_continue(fd, st, content, backup_file, 1, 0);
>>
>> Grow_continue_command_exit:
>> - if (fd2 > -1)
>> - close(fd2);
>> if (cfd > -1)
>> close(cfd);
>> st->ss->free_super(st);
>> --
>> 2.5.0
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-03-09 16:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-08 17:30 [PATCH 0/8] mdadm static checker fixes Jes.Sorensen
2016-03-08 17:30 ` [PATCH 1/8] Manage: Manage_add(): Fix memory leak Jes.Sorensen
2016-03-08 17:30 ` [PATCH 2/8] load_sys(): Add a buffer size argument Jes.Sorensen
2016-03-08 17:30 ` [PATCH 3/8] Grow: Grow_continue_command() remove dead code Jes.Sorensen
2016-03-08 22:42 ` NeilBrown
2016-03-09 16:19 ` Jes Sorensen [this message]
2016-03-08 17:30 ` [PATCH 4/8] Grow: Grow_addbitmap(): Add check to quiet down static code checkers Jes.Sorensen
2016-03-09 17:42 ` Guoqing Jiang
2016-03-09 14:00 ` Jes Sorensen
2016-03-10 7:21 ` NeilBrown
2016-03-10 16:40 ` Jes Sorensen
2016-03-08 17:30 ` [PATCH 5/8] {platform,super}-intel: Fix two resource leaks Jes.Sorensen
2016-03-08 22:45 ` NeilBrown
2016-03-09 16:23 ` Jes Sorensen
2016-03-10 11:14 ` Baldysiak, Pawel
2016-03-10 16:37 ` Jes Sorensen
2016-03-08 17:30 ` [PATCH 6/8] bitmap: Fix resource leak in bitmap_file_open() Jes.Sorensen
2016-03-08 22:50 ` NeilBrown
2016-03-09 16:28 ` Jes Sorensen
2016-03-08 17:30 ` [PATCH 7/8] Manage: Manage_subdevs() fix file descriptor leak Jes.Sorensen
2016-03-08 17:30 ` [PATCH 8/8] super1: Fix potential buffer overflows when copying cluster_name Jes.Sorensen
2016-03-08 22:55 ` [PATCH 0/8] mdadm static checker fixes NeilBrown
2016-03-09 16:30 ` Jes Sorensen
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=wrfjio0vvd2p.fsf@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=gqjiang@suse.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=pawel.baldysiak@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).