Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp692554pxb; Wed, 22 Sep 2021 10:39:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8e+6Q84izkxPXk6Zuft4GMFz0bxKmF7dISWFH2BL5/ET5B6LmjwfGWFpovZwRzOFINU7K X-Received: by 2002:a05:6e02:1a8c:: with SMTP id k12mr195559ilv.312.1632332362722; Wed, 22 Sep 2021 10:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632332362; cv=none; d=google.com; s=arc-20160816; b=zgtvlso1V1msbf8U/X3HVnePvGJ1tflZlrGg5C1VhtPXLtK/i6guUGFWAHOV4LqMx4 L8XD1bhDtlMe7Nov7dSOEUG6rsPi7SC45+7x9FNajTEanN7UxGeLh8Wub36iVHQyuvdh S8PnTdflHloP+q4ToIrO+/l3p3MbfIQu3H2ajy2HphWThcezOM8YbRf5wRNDZaZDyonK fApnbKvupyBeQ1J3LF6xm8H/n2fxQba4A8weEE7TVedPtXGWaq8QWi7CuKlmxAhVtm3+ RPZ3sqjEPEhTEpBvBxm0gciOZGZVIiQKnRBvEeCU9bfGj2NfF/528yZKMg7FWNd2bQN9 GEHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ohPa6Lwajw8vhCwLerBSIvFxJRh0fJUxeCrs38Mhz8E=; b=AjkKBV6oa1LRj1HmaUeHEi0NULlVrTwsmSsi5TQ+2OanbLelzMh8/DJQS9xQbjX2Kg cKr8VxCIYJjtaRVmsj7/rC11mUEnt5eWVD9NwX7Cxmymf9w8cPHYxb5wGNR8ziPQoRXt wri3E4ZGaAnIOIoqLduGHgdKcd97mYpH1NZF1/BjZbrXtJQ7bvtRhvCe1zv5ewDZj2Hq 4VFyGcavt19ChS22kxXseyUeOO3BpItRczisqZVyZ5h0CJhV2wTksQIWV0sdccXKv8zi v58M1p3ufSpbQeWNdFB6CiRJdYp3HvjF4z1YL2ztCqpH2GkAAV0HR+HHX5mnaOUaNnyr fQIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="p7vqj/kB"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si3335321ila.152.2021.09.22.10.39.04; Wed, 22 Sep 2021 10:39:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="p7vqj/kB"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236893AbhIVRkG (ORCPT + 99 others); Wed, 22 Sep 2021 13:40:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236886AbhIVRkG (ORCPT ); Wed, 22 Sep 2021 13:40:06 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3713BC061574; Wed, 22 Sep 2021 10:38:36 -0700 (PDT) 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=ohPa6Lwajw8vhCwLerBSIvFxJRh0fJUxeCrs38Mhz8E=; b=p7vqj/kBah76bp7Eus/YxKDd6A y1HfkQz1Yrzsf/lnZytkvzmzWXWkHpgpwsTBPEmdsEku2ZBkqpiFHCfOQphgwmal2vDhzCAHj8hy5 +YiWpjpdzeCerqNyrh217vz1NQfleiDwuqsYch4tVFHv6Ubgs/juzuhcorEU9dEaig1UqJvTOBTHk 3S+bN7RA6pUug/G93DTj03Z5FTT8ETti9kYjNBavnvXn5uMpBYPfNYuGpVwmAzVuVXkB1qG+XLh8B +1Fz8bZccV1omIRQtQ8AqJdtdxP2yaTiAXcRGZG0nwEgxIU0mcD19vwhhgkcCgMBIDghhTmERe5vV YIGssr6A==; Received: from [2001:4bb8:184:72db:3a8e:1992:6715:6960] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT6A5-004zgD-CL; Wed, 22 Sep 2021 17:36:33 +0000 From: Christoph Hellwig To: Dan Williams , Vishal Verma , Dave Jiang Cc: Mike Snitzer , Matthew Wilcox , linux-xfs@vger.kernel.org, nvdimm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Ira Weiny Subject: [PATCH 1/3] nvdimm/pmem: fix creating the dax group Date: Wed, 22 Sep 2021 19:34:29 +0200 Message-Id: <20210922173431.2454024-2-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210922173431.2454024-1-hch@lst.de> References: <20210922173431.2454024-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org The recent block layer refactoring broke the way how the pmem driver abused device_add_disk. Fix this by properly passing the attribute groups to device_add_disk. Fixes: 52b85909f85d ("block: fold register_disk into device_add_disk") Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny Reviewed-by: Dan Williams --- drivers/nvdimm/pmem.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index 72de88ff0d30d..ef4950f808326 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -380,7 +380,6 @@ static int pmem_attach_disk(struct device *dev, struct nd_pfn_sb *pfn_sb; struct pmem_device *pmem; struct request_queue *q; - struct device *gendev; struct gendisk *disk; void *addr; int rc; @@ -489,10 +488,8 @@ static int pmem_attach_disk(struct device *dev, } dax_write_cache(dax_dev, nvdimm_has_cache(nd_region)); pmem->dax_dev = dax_dev; - gendev = disk_to_dev(disk); - gendev->groups = pmem_attribute_groups; - device_add_disk(dev, disk, NULL); + device_add_disk(dev, disk, pmem_attribute_groups); if (devm_add_action_or_reset(dev, pmem_release_disk, pmem)) return -ENOMEM; -- 2.30.2