Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp655283ioo; Thu, 26 May 2022 11:26:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOMwjBzcEZq475Lua3ayouz6t0ebw7WBadegYvmcjhMDbBwJ+2cgoNzjN0xDO4YhTHOhhO X-Received: by 2002:a17:902:a981:b0:156:52b2:40d6 with SMTP id bh1-20020a170902a98100b0015652b240d6mr39138580plb.34.1653589590762; Thu, 26 May 2022 11:26:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653589590; cv=none; d=google.com; s=arc-20160816; b=jmT336eVQkjwgnR+52/YDYYfb3wp3nFlnxqLj1w3oXVVG4GNfbHTaLeezru276j+O5 6Tpxbstb3ScslAxqzVbzgYkkZjMe89P06xa+fvs8AafopF8lBHP8fSLkD/a7G95jL+W8 2asgCHpqUO2zy6nCbh74D/cqj1HaBeRCO1Oo/fVaZvqoOj0TH7m3sE3REadMDUS5UdR6 k165okAWGKV2k+SHoYwSMGkKZJjAGQClzRbohbKCVUYi7N/eyD17xy2TZ18LwEk0RZSC y03PhCss85XLSgjru/uwF4aZbtAOVtIu9j0AQjIxpCV1K41KVOYsE1jrQAupf4hAWDkn RW9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from:dkim-signature; bh=/WD2ehsnnbCNIuVIODA1HdN2V1ZCmC9syKI4aXJHfpQ=; b=ViDu+Njc/NMaWT/kBfq2svMi/bmYHx3JyibU80m2bXNLJPT3q5jHY1kN0sIm7Vo/lB yVU4qwWtlmvE0rl876G6fPo21/WLr2t5Wewz+DyvbxpSbWri6i9sg/Bv9ic7uXQLOjFV wY7N11ia4uaXIGaviolVriMS6qM/wSMQQc9wdOa0h4rxo/ko9K3sqfr97m9CXZjCGjqn ST8a8wpcne5HGTDkokzmM0iRizNYIf9yTUz52ZOCMuf9UHFmf6TPvPN/uyKSz3kK/VwC 75aspAvaIvyqzcqYkNIljgcJM+BWKr3EBfLObMzNMQZeY+Ij2Pp8WxqJeIjSsDG4VLh1 44QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=KapnB+8S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 123-20020a630181000000b003c511f50338si3324564pgb.848.2022.05.26.11.26.18; Thu, 26 May 2022 11:26:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=KapnB+8S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348258AbiEZQg6 (ORCPT + 99 others); Thu, 26 May 2022 12:36:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348147AbiEZQgX (ORCPT ); Thu, 26 May 2022 12:36:23 -0400 Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE8D34C7AA; Thu, 26 May 2022 09:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:MIME-Version:References:In-Reply-To: Message-Id:Date:Cc:To:From:content-disposition; bh=/WD2ehsnnbCNIuVIODA1HdN2V1ZCmC9syKI4aXJHfpQ=; b=KapnB+8SWlmnlWl89nEjcyvn7M VI5+n1DSCnhWLcUSdtGIvXIBi6A72nhIXHMV/WkKTM5w00AvPxuY+TMaydl737990T4R/Eg0QFF6X K5Z5bHpIwqzcEq5eaZg/D1YOaElz8K+zyo0HoLqfZCtZY/9ngzjn6w4o6Cy2e9g1sApnPjcq5l0Ip fE1eNHwBEbrnnvEFM89tYIjw7y/knRzJphEo/q4bxjCHg22qCgeFBpxrdRLHdD5xiZrXOMmv1po9n mr4M+3F1CPd0Q9z2H3U3DB+VdF3J8Hww31B2/or5RfcHu3R1DDlNLRg8fYqcEz5WOFVNaocygwNe9 IWPq+hZA==; Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nuGTF-008A7R-1W; Thu, 26 May 2022 10:36:21 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.94.2) (envelope-from ) id 1nuGTA-0008Xr-Lo; Thu, 26 May 2022 10:36:16 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu Cc: Christoph Hellwig , Donald Buczek , Guoqing Jiang , Xiao Ni , Stephen Bates , Martin Oliveira , David Sloan , Logan Gunthorpe , Christoph Hellwig Date: Thu, 26 May 2022 10:36:01 -0600 Message-Id: <20220526163604.32736-15-logang@deltatee.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220526163604.32736-1-logang@deltatee.com> References: <20220526163604.32736-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, song@kernel.org, hch@infradead.org, buczek@molgen.mpg.de, guoqing.jiang@linux.dev, xni@redhat.com, sbates@raithlin.com, Martin.Oliveira@eideticom.com, David.Sloan@eideticom.com, logang@deltatee.com, hch@lst.de X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Subject: [PATCH v2 14/17] md/raid5-cache: Annotate pslot with __rcu notation X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org radix_tree_lookup_slot() and radix_tree_replace_slot() API expect the slot returned and looked up to be marked with __rcu. Otherwise sparse warnings are generated: drivers/md/raid5-cache.c:2939:23: warning: incorrect type in assignment (different address spaces) drivers/md/raid5-cache.c:2939:23: expected void **pslot drivers/md/raid5-cache.c:2939:23: got void [noderef] __rcu ** Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig --- drivers/md/raid5-cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index 7c56ee977c3a..5ddfe29bc26a 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -2609,7 +2609,7 @@ int r5c_try_caching_write(struct r5conf *conf, int i; struct r5dev *dev; int to_cache = 0; - void **pslot; + void __rcu **pslot; sector_t tree_index; int ret; uintptr_t refcount; @@ -2776,7 +2776,7 @@ void r5c_finish_stripe_write_out(struct r5conf *conf, int i; int do_wakeup = 0; sector_t tree_index; - void **pslot; + void __rcu **pslot; uintptr_t refcount; if (!log || !test_bit(R5_InJournal, &sh->dev[sh->pd_idx].flags)) -- 2.30.2