All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ding Xiang <dingxiang@cmss.chinamobile.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: schwidefsky@de.ibm.com, linux-s390@vger.kernel.org,
	linux-kernel@vger.kernel.org, Steffen Maier <maier@linux.ibm.com>,
	Benjamin Block <bblock@linux.ibm.com>
Subject: Re: [PATCH] scsi: zfcp: remove redundant put_device
Date: Thu, 6 Sep 2018 14:43:22 +0800	[thread overview]
Message-ID: <2c9a39f0-b0c3-5130-eedc-aaa33ca00d04@cmss.chinamobile.com> (raw)
In-Reply-To: <20180906062414.GA3598@osiris>


On 9/6/2018 2:24 PM, Heiko Carstens wrote:
> On Thu, Sep 06, 2018 at 02:16:27PM +0800, Ding Xiang wrote:
>> device_unregister will put device, do not need to do it one more time
>>
>> Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
>> ---
>>   drivers/s390/scsi/zfcp_unit.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/s390/scsi/zfcp_unit.c b/drivers/s390/scsi/zfcp_unit.c
>> index 1bf0a09..6b50084 100644
>> --- a/drivers/s390/scsi/zfcp_unit.c
>> +++ b/drivers/s390/scsi/zfcp_unit.c
>> @@ -249,8 +249,6 @@ int zfcp_unit_remove(struct zfcp_port *port, u64 fcp_lun)
>>   		scsi_device_put(sdev);
>>   	}
>>
>> -	put_device(&unit->dev);
>> -
>>   	device_unregister(&unit->dev);
>>
>>   	return 0;
> I'm quite sure this change is wrong, since the put_device() here seems to
> pair with the get_device() in _zfcp_unit_find(). So we would end up with a
> memory leak.

Indeed,please ignore this patch.


> Adding Steffen and Benjamin.
>
>
>



      reply	other threads:[~2018-09-06  6:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  6:16 [PATCH] scsi: zfcp: remove redundant put_device Ding Xiang
2018-09-06  6:24 ` Heiko Carstens
2018-09-06  6:43   ` Ding Xiang [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=2c9a39f0-b0c3-5130-eedc-aaa33ca00d04@cmss.chinamobile.com \
    --to=dingxiang@cmss.chinamobile.com \
    --cc=bblock@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=maier@linux.ibm.com \
    --cc=schwidefsky@de.ibm.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 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.