Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp435897rdh; Tue, 19 Dec 2023 03:38:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IGj83SEPC58M6unk8n4jJawMX4lXbrK34ngCKv4FKk9zHIc3AVgusGp9eihilXVFlesR8BB X-Received: by 2002:a05:6830:a56:b0:6da:1dc2:a1e3 with SMTP id g22-20020a0568300a5600b006da1dc2a1e3mr13179165otu.16.1702985916648; Tue, 19 Dec 2023 03:38:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702985916; cv=none; d=google.com; s=arc-20160816; b=dCOsDRr+F9BBPHHx+MrO5GtZeU/c6TD3w6BN+Wxn/bquX1r5c/43qSTbTIN4BKJWZX ggqI0P8rv+RvkVc/2zAeDTwuNBV82/IG3YuK4GpH76HPi6dVLncuqiwJ9zz7Dm7Uf7Ej uwOsVjnMI7TGzEyABrTf7QjR3gb5QUHj+pJwSLQJlNVrvjwTj8Ybna9KQmay/r6S71mo UM+gwKrDJptHMYpx8EUPUqzX28O991hZ7EsWcAuTnGPJwW7w6wewqqol9GZHd9K1sKjb RiwPuAsIrRo4KhyNA5gqnmK2Z6tIdziV2tCzzYGuyPWWcSmMZrBeXmLU9MyKE8ROPVdV A4aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=GlCCfHdUF8E59zVa06E6NUBcKS5WmlSLYddFv13EMtg=; fh=Ob8FspbdAv2lvfy9oyzcNqJb9FlG/MYewgbmONDw7dw=; b=0DV/PQYRFDl0R813EbeUYoF6hr+sWkjLlg1BDfxLRWNTGDHCLdOPT9Ht1vjX31pr4T xASQUZ8qpzyHX0RNa3HENefYfa7gM628dyRda08N25PigIN/lGt56X3KvRbANQPleKKH gaZoqOOevpckP8NtueKoNNrdIeRomSmOHpWglbBs8Px2cyrMb+cRLHzs1LpASdVcZNFW WIQ89cmEWpg20v3+HuKFNYBgCMBgZlUeTF79vCW+C59RiQVzaUqpJyg1MDGCrIHizyoN 59kttC2r78Ii9uznxnlDry+nJLXoRmGVDGINxuZ8sAbaEr+mNBnCxQQAEzx4Naxem97x IAmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=MhBLKJ1g; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=MhBLKJ1g; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel+bounces-5090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5090-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y8-20020a056a001c8800b006d92f081d9asi1457891pfw.0.2023.12.19.03.38.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 03:38:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=MhBLKJ1g; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=MhBLKJ1g; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel+bounces-5090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5090-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E1618B23257 for ; Tue, 19 Dec 2023 11:38:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 538A015ACD; Tue, 19 Dec 2023 11:38:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="MhBLKJ1g"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ALIu4m60"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="MhBLKJ1g"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ALIu4m60" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26914156C0 for ; Tue, 19 Dec 2023 11:38:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1EF09220EA; Tue, 19 Dec 2023 11:38:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702985900; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GlCCfHdUF8E59zVa06E6NUBcKS5WmlSLYddFv13EMtg=; b=MhBLKJ1gUpS3nbAKExf8T7817nxvJxnyDDq2JnihCsAprWCJ9eJp1aKyf4thjNPeudqdjc NF4wMdfHOnfrkz+QZ3Tk+bRqkCn0BS80ibfykJRdOjdBbdoo9htRhcrfUtz5tCte7PFYBb hL1yAZL3MP4AFOcw7lGi5vDCH5gfG00= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702985900; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GlCCfHdUF8E59zVa06E6NUBcKS5WmlSLYddFv13EMtg=; b=ALIu4m60oCV5YLeYV3Y79RDXz9JsSAFVY7RiDVQLnAGnKkvOcL/3ucxR6/oGMn+fy6XE1T hE7rBS1o6PoygyCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702985900; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GlCCfHdUF8E59zVa06E6NUBcKS5WmlSLYddFv13EMtg=; b=MhBLKJ1gUpS3nbAKExf8T7817nxvJxnyDDq2JnihCsAprWCJ9eJp1aKyf4thjNPeudqdjc NF4wMdfHOnfrkz+QZ3Tk+bRqkCn0BS80ibfykJRdOjdBbdoo9htRhcrfUtz5tCte7PFYBb hL1yAZL3MP4AFOcw7lGi5vDCH5gfG00= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702985900; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GlCCfHdUF8E59zVa06E6NUBcKS5WmlSLYddFv13EMtg=; b=ALIu4m60oCV5YLeYV3Y79RDXz9JsSAFVY7RiDVQLnAGnKkvOcL/3ucxR6/oGMn+fy6XE1T hE7rBS1o6PoygyCg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B31F71375D; Tue, 19 Dec 2023 11:38:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id +bcVJ6uAgWWGNQAAD6G6ig (envelope-from ); Tue, 19 Dec 2023 11:38:19 +0000 Message-ID: <824b9386-7c95-49d4-995a-d94c35855287@suse.de> Date: Tue, 19 Dec 2023 12:38:19 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 12/16] nvmet-fc: do not tack refs on tgtports from assoc Content-Language: en-US To: Daniel Wagner , linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Christoph Hellwig , Sagi Grimberg , Keith Busch , James Smart References: <20231218153105.12717-1-dwagner@suse.de> <20231218153105.12717-13-dwagner@suse.de> From: Hannes Reinecke In-Reply-To: <20231218153105.12717-13-dwagner@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -2.02 X-Spamd-Result: default: False [-2.02 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BAYES_HAM(-0.73)[83.85%]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[7]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Flag: NO On 12/18/23 16:31, Daniel Wagner wrote: > The association life time is tight to the life time of the target port. tied > That means we do not take extra a refcount when creating a association. should not > > Signed-off-by: Daniel Wagner > --- > drivers/nvme/target/fc.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c > index c243085d6f42..47cecc8c72b2 100644 > --- a/drivers/nvme/target/fc.c > +++ b/drivers/nvme/target/fc.c > @@ -1109,12 +1109,9 @@ nvmet_fc_alloc_target_assoc(struct nvmet_fc_tgtport *tgtport, void *hosthandle) > if (idx < 0) > goto out_free_assoc; > > - if (!nvmet_fc_tgtport_get(tgtport)) > - goto out_ida; > - > assoc->hostport = nvmet_fc_alloc_hostport(tgtport, hosthandle); > if (IS_ERR(assoc->hostport)) > - goto out_put; > + goto out_ida; > > assoc->tgtport = tgtport; > assoc->a_id = idx; > @@ -1144,8 +1141,6 @@ nvmet_fc_alloc_target_assoc(struct nvmet_fc_tgtport *tgtport, void *hosthandle) > > return assoc; > > -out_put: > - nvmet_fc_tgtport_put(tgtport); > out_ida: > ida_free(&tgtport->assoc_cnt, idx); > out_free_assoc: > @@ -1182,7 +1177,6 @@ nvmet_fc_target_assoc_free(struct kref *ref) > dev_info(tgtport->dev, > "{%d:%d} Association freed\n", > tgtport->fc_target_port.port_num, assoc->a_id); > - nvmet_fc_tgtport_put(tgtport); > kfree(assoc); > } > Otherwise: Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), GF: Ivo Totev, Andrew McDonald, Werner Knoblich