Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp150779imm; Wed, 5 Sep 2018 23:29:28 -0700 (PDT) X-Google-Smtp-Source: ANB0VdacEo6gM2Tm5lBI/twrpAb9AU4ZMAHsR24ZCoiJc7W0hKNcZm2WjSZcdfFqcdW1zHfcoLEw X-Received: by 2002:a17:902:290a:: with SMTP id g10-v6mr1280808plb.110.1536215368495; Wed, 05 Sep 2018 23:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536215368; cv=none; d=google.com; s=arc-20160816; b=SSugnjRqtF9smHInKe2+byvErsncd1XIDVVy/AsM2Z4pbu+uZ+6m1Wg68EzDE6vL+p gvcJ5mPgQco/45J6PuhU/+o9E1djkvs+lcW+N6sr2dP2t05nMOjumwPRxpSMmtX3szqB a6sXbpu1gqQUreZVZ4isGj6PhtZ74KrkRN7Ng4HqkSDmnBHVXk34KLKx8En8IkOZ3D/J BE9+djIRoqUJPncweqQC0IzGw9OucJ+SYMy3VFreaIQ+QzMaN62gTusUpPPcAG7SIO0i ITqJ1nzrHbzPk3Ed6+QFDqPEl3tVIkQTM8dArOXq3e8ERxnFjLWtsS06LgvCL4rtdeaA Sc1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:message-id:in-reply-to:mime-version :references:subject:cc:to:from:date; bh=xi5dUM5uoX+ztvmdnWyoR/4xjBhh5NYfev4BieM2q/M=; b=rcfDXCTLhBihwQUE84979UHVN/9SUPxMzekX/Ynjyxu4eb5OpZ+v3JzfDmSBXJQWkc IxPbpte+iAd+lOIo3CXdAt7lw9MfhLE8jpENR9GYEkqjJTZMPmAydwm1tm1tDVZWLgaH BcH9mbd+7fieaPu21Y3Yjhb+AR7DkPzjjWWMOWyhbJTd36dVcqtZMCNyYzPwE6KagFEM wzbhryMPWjE7tGQfQqnzrnf2ELjcWNx/WAUTPuXx/jtLRP1ivn+rp7T84PJISlzP8KJD CKybX+DARbYGJt41amMh/QcAn3WFKUzgrLjDNTJu6zwj8Kzbq/E49WfaujJY1ZBDWuN1 gRYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bh1-v6si3978610plb.190.2018.09.05.23.28.43; Wed, 05 Sep 2018 23:29:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727625AbeIFK6Q (ORCPT + 99 others); Thu, 6 Sep 2018 06:58:16 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:53384 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725940AbeIFK6Q (ORCPT ); Thu, 6 Sep 2018 06:58:16 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w866NsbV119483 for ; Thu, 6 Sep 2018 02:24:23 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2masq32g6u-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 06 Sep 2018 02:24:23 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Sep 2018 07:24:21 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 6 Sep 2018 07:24:19 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w866OG1B35127358 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Sep 2018 06:24:16 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0E4454C058; Thu, 6 Sep 2018 09:24:11 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CD07C4C040; Thu, 6 Sep 2018 09:24:10 +0100 (BST) Received: from osiris (unknown [9.152.212.24]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 6 Sep 2018 09:24:10 +0100 (BST) Date: Thu, 6 Sep 2018 08:24:14 +0200 From: Heiko Carstens To: Ding Xiang Cc: schwidefsky@de.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Steffen Maier , Benjamin Block Subject: Re: [PATCH] scsi: zfcp: remove redundant put_device References: <1536214587-32500-1-git-send-email-dingxiang@cmss.chinamobile.com> MIME-Version: 1.0 In-Reply-To: <1536214587-32500-1-git-send-email-dingxiang@cmss.chinamobile.com> X-TM-AS-GCONF: 00 x-cbid: 18090606-4275-0000-0000-000002B60908 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18090606-4276-0000-0000-000037BF2614 Message-Id: <20180906062414.GA3598@osiris> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit Content-Disposition: inline X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-06_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=949 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809060069 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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.