From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Ding Xiang <dingxiang@cmss.chinamobile.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 08:24:14 +0200 [thread overview]
Message-ID: <20180906062414.GA3598@osiris> (raw)
In-Reply-To: <1536214587-32500-1-git-send-email-dingxiang@cmss.chinamobile.com>
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.
Adding Steffen and Benjamin.
next prev parent reply other threads:[~2018-09-06 6:24 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 [this message]
2018-09-06 6:43 ` Ding Xiang
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=20180906062414.GA3598@osiris \
--to=heiko.carstens@de.ibm.com \
--cc=bblock@linux.ibm.com \
--cc=dingxiang@cmss.chinamobile.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.