Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2688518iof; Wed, 8 Jun 2022 09:58:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEK6nCqPiU5vTLNOsuHHYca1fjowPuJMl1UAU8A9hFiqVk37/YSyKKiSEk+d246KqAH7dP X-Received: by 2002:a17:90b:4b83:b0:1e3:3ad3:612c with SMTP id lr3-20020a17090b4b8300b001e33ad3612cmr130427pjb.87.1654707503204; Wed, 08 Jun 2022 09:58:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654707503; cv=none; d=google.com; s=arc-20160816; b=sLG6bbNl2aTwuySMvE1h3pLAm0pym3VgH7wlgt5wbf5vRzxfXmwFt68oAaa77EKuTH iFJoEoDN8XhDCtsdUBV5gdpWVwQB4uwvOaqtV+FR8KxP6UOUtyAFr+heFjP9KU1whCXU JhG+Y3rPe7GNYMW/z6Y5szQzAKZ7sQ3N4YqSht5XL5rLu6ZfIOdbE4K+3wemxacQrrI7 u97g/Qt1QGF/B4CEO2ie1nwZuhWfDWOG3gsFflNeJXJPjYtJDmqGomZqKCDELb5uhIuL 6q8ZjfzryJ4qPD1G8+surMQOT/9Zw8IIEOSJUNQuALtFgSvYzjwPnzzHdANppbHHwJRb Sf4w== 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=L1YSyIwmt/8wrOpuPigujjiYrhfSTXHie0bjSBKX4FM=; b=Vk9PQUqHtblmcduC/UqpkiDbc/e1CQ9/bbt/RExjQimArMvCcOHKbQT0ISBMN/GScB Eh9FEyL55e8Taj4SJ7kGnsL383RVH9KMamUB0zWhYyAlRLA1tASDaYfTMVrvfYsbhOPh IwxBDcPhsaLBlTXrkwWdSknwDkbArKxN5ni+8qwzDJPpFWmVkqgs4tfl5nY8G8FhHY2t WTLvMmoexWM4C7Zf8z+SctMkmRmPPgjwKYtnnfrdZFFewwb/niZGr7eCgIZff3lVQ2kv zc9g16ujRZ+K9cRxcDsrd4jWniq8dQsbU7xwwax9+G3Nd/Dryg3U4ij3573k+qz06maM bXSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=WU51Y3yy; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u10-20020a170902e80a00b00153b2d165d8si31663349plg.480.2022.06.08.09.58.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 09:58:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=WU51Y3yy; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3EFFC24319D; Wed, 8 Jun 2022 09:29:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245635AbiFHQ2k (ORCPT + 99 others); Wed, 8 Jun 2022 12:28:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245167AbiFHQ2H (ORCPT ); Wed, 8 Jun 2022 12:28:07 -0400 Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF2521FE4E8; Wed, 8 Jun 2022 09:28:06 -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=L1YSyIwmt/8wrOpuPigujjiYrhfSTXHie0bjSBKX4FM=; b=WU51Y3yyNVIN9vWBu2qJuimVTC HHLz9k1olcviSeNoQtowcHRIcGQxs8wrOSC+ryZTU2GJs/bpOe1gZCo9/9S/ILYm2+GyULFBv9OHE ecL5rAHtHXcHOYd8n9vUZbNGFGkpsyikDLluA3EB8JJXeTRcGXf6GN6u8HDO5i5qGdSlUxFkXY3jN Sk2bMBsn1bzrbKM2tY+52kz8yXRZJSQqwA7kM3tp+cDUFXuQ1Tpdi7X9tDAED3hHoCqJjWaC5pFXu FkT8AkQvwAzzC0fpP5NpJn1yw0WiTbm2rhSh8VVhsd0O3mZKM6FmzUwNulDYCz2i4yRTFjJH2+eYR BWrnsUZw==; 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 1nyyXM-0026n7-P3; Wed, 08 Jun 2022 10:28:05 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.94.2) (envelope-from ) id 1nyyXH-000bdc-DL; Wed, 08 Jun 2022 10:27:59 -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: Wed, 8 Jun 2022 10:27:53 -0600 Message-Id: <20220608162756.144600-9-logang@deltatee.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220608162756.144600-1-logang@deltatee.com> References: <20220608162756.144600-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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Subject: [PATCH v4 08/11] 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 ca57b5fac599..b2e6016934ee 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -2637,7 +2637,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; @@ -2804,7 +2804,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