Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp161658imm; Wed, 5 Sep 2018 23:44:53 -0700 (PDT) X-Google-Smtp-Source: ANB0Vday3dZ6TYfzPStwwt9TS8z3zM6B0mwCyd1l9vs2JPTvhUYMb1OcxnMulag0s17DGR7iliqq X-Received: by 2002:a17:902:292b:: with SMTP id g40-v6mr1251733plb.223.1536216293889; Wed, 05 Sep 2018 23:44:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536216293; cv=none; d=google.com; s=arc-20160816; b=L1s2Gjuf/R1VBtSEfhXcfnOuIgtyGQJdSGLQ3tJ0gLK1cDo2pLdJUwe4wXwOQFVu3w JUeehwOYNJ7+sSZL3Q9K36JSPD63izRYJYy3AeTWIK2ZQqkFW9qT6+s4VGrfG+0JRQaL FyXgznkZj8cEtK2h6IdVeQ8fA0fYkBaxplrULMRT96MgVxE8EzljV/ewqFI9jZbzIwnG iwzdiu26BfYL0rbBivQc+O4hFPivkbPJmqJbHTakP7LTMILCkt482njkOPgpd16XWKSH T5pDr6YnVM6BzuKaz05iPNeYhYggHLwDbweJSBcVuJ3xJX+nTYf5vbf2CV+mrkkbdnkH dUfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=AL3DgxLtxUgwoTZpvQ7Bs3IuRQChatkY8bnj8x5ICGc=; b=enZ+7/gzPLvKaWzfvWauybNz6qQVNbVnUepUxM4a1ZeDFapas7PCFmcYqfG9Wr/PJb s8dEQcrc68FvCR+W+QHYq6r5IXNDV3svcMr+e4oeb3wHieBe/Y0QeKwzJuUbjSHxQALb 4zxnynNbrlwsdAtU9LXnxFfk5n11vx0mJFOAa8ajeGDZxuFVAOdOCHsNT3GzLnqNa8jb gSV0+rnU6aCRqsDRtbbf4b4Ff0VocVgLQgjahHSNodIR22Uo4abyTJBFHAOQj1iVIztD 4dgnZpt2ObuLGy+10VsvkAfYeYOBUT6G8XlcuHK9pjk9a//1ul+FmdV8wRW4kF7VCQaC YD2g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4-v6si4088877plr.213.2018.09.05.23.44.38; Wed, 05 Sep 2018 23:44:53 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727593AbeIFLRa (ORCPT + 99 others); Thu, 6 Sep 2018 07:17:30 -0400 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:35871 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725940AbeIFLR3 (ORCPT ); Thu, 6 Sep 2018 07:17:29 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.11]) by rmmx-syy-dmz-app03-12003 (RichMail) with SMTP id 2ee35b90cc8acfd-ffd86; Thu, 06 Sep 2018 14:43:23 +0800 (CST) X-RM-TRANSID: 2ee35b90cc8acfd-ffd86 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from [172.20.21.81] (unknown[112.25.154.148]) by rmsmtp-syy-appsvr06-12006 (RichMail) with SMTP id 2ee65b90cc89668-d977f; Thu, 06 Sep 2018 14:43:23 +0800 (CST) X-RM-TRANSID: 2ee65b90cc89668-d977f Subject: Re: [PATCH] scsi: zfcp: remove redundant put_device To: Heiko Carstens Cc: schwidefsky@de.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Steffen Maier , Benjamin Block References: <1536214587-32500-1-git-send-email-dingxiang@cmss.chinamobile.com> <20180906062414.GA3598@osiris> From: Ding Xiang Message-ID: <2c9a39f0-b0c3-5130-eedc-aaa33ca00d04@cmss.chinamobile.com> Date: Thu, 6 Sep 2018 14:43:22 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180906062414.GA3598@osiris> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> --- >> 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. > > >