Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1559988ybn; Wed, 2 Oct 2019 18:47:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbuM4EJzJeqzipsPVeesBMb1E7HHSEJPEituOphsadNulT3V2R/Szt6n+SDQOdECYTb2Nx X-Received: by 2002:a05:6402:1246:: with SMTP id l6mr6898363edw.213.1570067227713; Wed, 02 Oct 2019 18:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570067227; cv=none; d=google.com; s=arc-20160816; b=s4QOuTMWyWkN6/IKH0L2z9oteGaJ66w2Nr8M6B9Ahjkujf83bF/VGjLHC4ut3Yo3Pg JElzZjZutw2NJpRsSLlg99nbqLTSW2LbrSU1T/XO54A9d5c+b82NKvFqeIiiQYA5Lm0k JF7HSxlZe56hdqWUkA8IrSVaW43om9J0WbCkQSEdKGIgS9cCdtcGi1kk6Gyo4Ctn+/FW uAYOA20ygyNaCCcWvIRa8cVxDw5DK7JQ5+HuTbCo/creWzGeOCOuMw9nE8aKOumTCYR1 l8YUDhSAi+J2tGrWJB3t3sPZUhNklLRKGFzjFE94MnwUe0N05425y2357kle4x3x90kT jr1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=f+d9IpycTTAhdS1KAgo2krAxpAOIIWnNJIEG9XNUggQ=; b=byZFFyxS2RNVJ53LyR5A21MbKfspV+Om4g0PZl7G1UBbj9q0MMoqENNMZ4Y0Qa0luh A5uDBTt9WPWcnXiZ7eqDvP8BnYnMwCirIswp7GhUdNEX1JkBB+T0qYI30fw2z4/CMgn7 6NsK9j3OeoHzjNRooMQkudcg62TYw7JLHsRMqIagpKA2n5a16X4hC0tj7+xfxJfCIPR0 0FSSaIQUoFhsBy5RBflvqa5x5LwEFMXD4vD+QxeTmM6YO34WdoDO0Uw1vTzl7L8yZSGv nJecYsxFi0TbqtxjKFTfHHan9ttHZ0eZRXap11uWcyC+wvZJmVutiaAKqCoJZJ3f5uIm 6pzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i0cSwzfg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si560264eda.129.2019.10.02.18.46.43; Wed, 02 Oct 2019 18:47:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i0cSwzfg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728178AbfJCBnf (ORCPT + 99 others); Wed, 2 Oct 2019 21:43:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:46392 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727287AbfJCBnN (ORCPT ); Wed, 2 Oct 2019 21:43:13 -0400 Received: from paulmck-ThinkPad-P72.home (50-39-105-78.bvtn.or.frontiernet.net [50.39.105.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 47DF7222C5; Thu, 3 Oct 2019 01:43:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570066993; bh=rotuVr8T+0nH2VJEluJRScYkA/ofar/x0CByUKr1zYg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i0cSwzfgP4CdMi/Y04TcV13gJxLnhpwf96lljXXzc+5CjBH7f9cAgNQT+k+ML4pHH aEWpcJpq4jIKKa+A23ysWzFqZQngIebEkAr4uoes9A0gR+mbHYPbwJzXvYiKl2hgkO WMRSf9mxzPQRWWUzzJMduqVSWhFFg4FqVf2+CdDU= From: paulmck@kernel.org To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org, "Paul E. McKenney" , linux-afs@lists.infradead.org Subject: [PATCH tip/core/rcu 5/9] fs/afs: Replace rcu_swap_protected() with rcu_replace() Date: Wed, 2 Oct 2019 18:43:06 -0700 Message-Id: <20191003014310.13262-5-paulmck@kernel.org> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20191003014153.GA13156@paulmck-ThinkPad-P72> References: <20191003014153.GA13156@paulmck-ThinkPad-P72> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Paul E. McKenney" This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds Signed-off-by: Paul E. McKenney Cc: David Howells Cc: Cc: --- fs/afs/vl_list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/afs/vl_list.c b/fs/afs/vl_list.c index 21eb0c0..e594598 100644 --- a/fs/afs/vl_list.c +++ b/fs/afs/vl_list.c @@ -279,8 +279,8 @@ struct afs_vlserver_list *afs_extract_vlserver_list(struct afs_cell *cell, struct afs_addr_list *old = addrs; write_lock(&server->lock); - rcu_swap_protected(server->addresses, old, - lockdep_is_held(&server->lock)); + old = rcu_replace(server->addresses, old, + lockdep_is_held(&server->lock)); write_unlock(&server->lock); afs_put_addrlist(old); } -- 2.9.5