From patchwork Thu Nov 26 13:03:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 1406720 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=GZBWylT8; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=VzUQYe4P; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::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 ozlabs.org (Postfix) with ESMTPS id 4ChgXZ3zN3z9s0b for ; Fri, 27 Nov 2020 01:45:18 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CC/qv0JEIxfcKcKSHs2jboOVeiyR7Wm4TEb8ZSc7qIo=; b=GZBWylT8TThCETdzLWiQwCzcL aAY2W4E8PSMlpXux0ryTxGeSlc0DalpntOCDzuQY69vD+3gZw+ukkhmVOK7BGGEVlnClmpG1n878j GHSh7xX8HTdUdwIeFkdwChxRLM6ppZa+fOlkmrvjDLnIAiHoG/X75+20V/ci0OoYcFSKzbecljjoY I/xqmDSaS9ryYvxzm/wQzcch/PCxuTKhFdCqvi9E+2PNGJN2HUrzLIz/uOrS86NpI8fiUESCMrwED +QxM+/ErGdeUfHZ1lWI7qEdJUlbaeMAc841OTFun+n4BiVMZfCystnlyH1EjoNlKde9FewmdhRzVJ QtSKq2NfA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kiH22-0000yo-6A; Thu, 26 Nov 2020 13:09:54 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kiGz8-000832-HG for linux-mtd@merlin.infradead.org; Thu, 26 Nov 2020 13:06:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=cCnViX+7xYhlWEzFMVB617+yZ+N1oSjUspGr9itxVFQ=; b=VzUQYe4PCSUVBLjyrp4E9LCtQJ XWkIY4HP4CkDFngCBsYLu53aQQmNRsKryD/8/xId8wZEza5fOchC/fad7N9a4c+Ha/D9sFEms7488 vkQLzYPfbMTG05cyhFSEunx8YiD3qGcvShoR4Bx52A+/X0uCfLp9LnYvQFHOYY8MIxPs9eFjRpDxD mIW+cwivF+3AuHdm2iQ8pArJ1hwFCl40zEDaCcYrKEAULepbkyCd0rxu6DxVGTXiNb/v7L9hkggQy hkAdpKbQPAaKr0ezNuxpGLVioHZJ2rdtKUOz24YVjFqt2ucmLwf2R95JzwyXHHvyBaNJznmIfXECV ivBrU1cg==; Received: from [2001:4bb8:18c:1dd6:27b8:b8a1:c13e:ceb1] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kiGz7-00040B-5z; Thu, 26 Nov 2020 13:06:53 +0000 From: Christoph Hellwig To: Jens Axboe Subject: [PATCH 14/44] block: use put_device in put_disk Date: Thu, 26 Nov 2020 14:03:52 +0100 Message-Id: <20201126130422.92945-15-hch@lst.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201126130422.92945-1-hch@lst.de> References: <20201126130422.92945-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-bcache@vger.kernel.org, Jan Kara , Mike Snitzer , linux-mm@kvack.org, Greg Kroah-Hartman , Jan Kara , Josef Bacik , Coly Li , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, dm-devel@redhat.com, linux-mtd@lists.infradead.org, Johannes Thumshirn , Tejun Heo Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Use put_device to put the device instead of poking into the internals and using kobject_put. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn Acked-by: Tejun Heo --- block/genhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/genhd.c b/block/genhd.c index 0bd9c41dd4cb69..f46e89226fdf91 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -1803,7 +1803,7 @@ EXPORT_SYMBOL(__alloc_disk_node); void put_disk(struct gendisk *disk) { if (disk) - kobject_put(&disk_to_dev(disk)->kobj); + put_device(disk_to_dev(disk)); } EXPORT_SYMBOL(put_disk);