Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp6046981ybg; Tue, 22 Oct 2019 12:15:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAGRixVyeCXNBeLH+1a9dnkfRMdtoUW+B4sTIotlRnpNmfTEz4+t4GRtqdbGoreJbj2yeK X-Received: by 2002:a17:906:edd7:: with SMTP id sb23mr13037322ejb.168.1571771710286; Tue, 22 Oct 2019 12:15:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571771710; cv=none; d=google.com; s=arc-20160816; b=ReyX3pZiCHH/Kjua7OZNo+Q8AZrZhaJCRiwtXIrgoV2aDeHcBgbFeHIVEbHovLhNsP KBvKu2WMhMDFfaYDTxB4fwOgWe8foqh8j5HGacYm0wXJmMCKAwhpwObJGpxQ/GIWszHy 30XyLIKVZxRQRPmHJZb0YqQTOFzOKWlXx+gRXCBo3CDViM+aG/J7kiJobqbuDQM4wO3Z r+jXjpzzLusAvRUfbqR+cMWlHytNwFMEYXt+sGspNPcgpy4O6arTzEnCYh0VnQyvLNwp eJyhV7Ass7i+qd8Xe4ThaFsCiWNS66VcKafw5nGi8NT1wzWReZnr2eGJXLtsBJJZRZUl fmSA== 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=0vlusLXnGcnTxd6F1Qa3cQhxWvV9KKWMMfMuQSqOchI=; b=yJJtJcmXnEBb5aI/9jod7unU+PSwnuJiRvMaW6vSRKg/32beZMe4b2A3WTogbnN7xl qyQl04c6e+b4ze2sT1YdBuE74o/Vi+KmDo9Y7iTMf4fy4WWr5lAheuRRtSNuxpXJOUSf XKTDH4ABqGSq1cnmGUUp5u4ygvfrE14LKwSxUoPDq33+H05URO/OAC2Gsmi1eL3kHEkW HOGnXjfWOnVQ7XHsu/06AV+tANXMWkqvw2qKd7LAwAVUqrNxE9HWGjqbRROI2Bs6YiiC v1N/jABastCWFWNGyd0DKiIYsSlaZi1/V32ZxUlUqI1Ur5V89D18QDzmS2ys9vFFjHeQ toXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ietizg4m; 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 e14si1781540ejq.406.2019.10.22.12.14.45; Tue, 22 Oct 2019 12:15:10 -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=ietizg4m; 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 S1733000AbfJVTMb (ORCPT + 99 others); Tue, 22 Oct 2019 15:12:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:43538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732903AbfJVTM3 (ORCPT ); Tue, 22 Oct 2019 15:12:29 -0400 Received: from localhost.localdomain (rrcs-50-75-166-42.nys.biz.rr.com [50.75.166.42]) (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 E1A4521D81; Tue, 22 Oct 2019 19:12:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571771548; bh=c352t9a37W5iZ6QoYbS1JdFxmkNCiGi48vP+/8QJvW4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ietizg4mUds30r5O4A4J+Bp5G/ZLJ5XbMtd5So8K55enMBKbNOcUbvqKS9Wm7AqeZ nq1d2JW4rk9RdrqiB7AoaNsv4o26kshE0NqC+GcPcOfsp6Hg2oq042xGZJ7Od+fJcT qkSF05XSStsT+H5BHnc4OcVoBm5L3+4eCM7DhPKA= 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 05/10] fs/afs: Replace rcu_swap_protected() with rcu_replace() Date: Tue, 22 Oct 2019 12:12:10 -0700 Message-Id: <20191022191215.25781-5-paulmck@kernel.org> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20191022191136.GA25627@paulmck-ThinkPad-P72> References: <20191022191136.GA25627@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 [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney Acked-by: 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..8fea54e 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_pointer(server->addresses, old, + lockdep_is_held(&server->lock)); write_unlock(&server->lock); afs_put_addrlist(old); } -- 2.9.5