Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3284454lfo; Mon, 23 May 2022 00:41:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoeoeh8Vs5oFpHslIojawZUj9eXDG0q2kGSLP0ODMje61hMSmAn7ulOcsEZbj65P+AAjUE X-Received: by 2002:a63:6bc6:0:b0:3c6:b38b:a84 with SMTP id g189-20020a636bc6000000b003c6b38b0a84mr19155266pgc.422.1653291674099; Mon, 23 May 2022 00:41:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653291674; cv=none; d=google.com; s=arc-20160816; b=JPMyBGBrlaC1W5v0fxjlxlJ6MrdiPuGpbaika2Qfu5fI7JSxnuVaMz84B+n0UBTTFO Yzo1jpItIZvEh7aog2RwiY1SpzlY+xt3hxtD5ZixAhRS4aw193cNSmj7+kHh6ioO1GoJ 8uohq7VFlApD5gqkCGm8ci58w/m13C2KGtUZS20A5Kbxd5l6hjX8V0MwZ1LxdDkv1DEX m6WxpHHE3X/4kXR2qBnZxNqAR6xhWhLuv/RdUwRg/yIfeSq6B0VY4VBvTVXLzsz+6KUH qtxYfWaWRay2KKWMh3le+qOgz08cHJq7gVAPe2ERNjzPKnfJ6MnMsxEeww1GLmAnrQuC sDug== 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=iGKyeE3hyk0q9jmoVwSEHBFtpjdddjD8HiW/2+TcCpo=; b=znC18ggUj2uyWY3Ec+E3RZ+zjv1cIQG0pMLWTm6FD23rRACtRwDtG+2b0hxiPMWRHp p2Qo0eDIirH5SONc2tQMe6RqjP6oOgL1CDgWGOgI7VhdilhcesGxuUmn/jx+ReNeChun v7hRCcdNwK5KGoL3V5bdOyhp/kZZzPT4oBqWp4vTmzpt3S9Z5pi/nT0iAHprpz03RA6i kluZCPA4h64TtN/zKiqQ19U3WLPvDTlplkaLQ6ADmYD/k6AsMryoTZ0+8FnR4j7pUhJN kUwX0EtyEtxwrq2m4Mxs/FooJDjXb/VfnG+en0sCkrXLk6iHvAwJisPk1Yd9o2YyVER4 ItvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=FUexMxuw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j5-20020a170903024500b0016178ad9a19si10423441plh.75.2022.05.23.00.41.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 00:41:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=FUexMxuw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 AC14A1D3D16; Sun, 22 May 2022 23:48:29 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244458AbiESTOn (ORCPT + 99 others); Thu, 19 May 2022 15:14:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244332AbiESTNZ (ORCPT ); Thu, 19 May 2022 15:13:25 -0400 Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7AE1AFAFD; Thu, 19 May 2022 12:13:23 -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=iGKyeE3hyk0q9jmoVwSEHBFtpjdddjD8HiW/2+TcCpo=; b=FUexMxuw0kjZzHdkmuIxFkYQnM kSDpO/lp1PyYqiB7qIcmWCT0vUxHaXsjzlBAByiRv3zN3mXW9YyzGQdIDLN7xof6wo78+K3o2Zxp7 tTtaOC4uvHA5vonPw6yAN/Wv9dTJE6pUZUzm8DkZTqLniJEymv45m7SNcQZiSRnWyOZJsDWT3lC+3 E/KuDIaHYWROJZgutD7d58tWeNgeRAuN/DvR2MGnrpdPt55K5fam/ySh9BAn8zVFPQvALxmFzGvlO X/4zGlSqGnGf6rgsg7/s+24qUpvRw6UUbptjdA14v1nMkLbz0k9HMf3Vac+3dUQTRq5hTNxxCqyxF MOQA+bfA==; 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 1nrlaJ-002TqS-53; Thu, 19 May 2022 13:13:19 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.94.2) (envelope-from ) id 1nrlaF-0004Tt-LF; Thu, 19 May 2022 13:13:15 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu Cc: Christoph Hellwig , Guoqing Jiang , Xiao Ni , Stephen Bates , Martin Oliveira , David Sloan , Logan Gunthorpe Date: Thu, 19 May 2022 13:13:09 -0600 Message-Id: <20220519191311.17119-14-logang@deltatee.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220519191311.17119-1-logang@deltatee.com> References: <20220519191311.17119-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, guoqing.jiang@linux.dev, xni@redhat.com, sbates@raithlin.com, Martin.Oliveira@eideticom.com, David.Sloan@eideticom.com, logang@deltatee.com 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 v1 13/15] 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 --- 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 1dbc7c4b9a15..a541d17f84f6 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -2683,7 +2683,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; @@ -2850,7 +2850,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