Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1867037ybz; Thu, 30 Apr 2020 06:56:43 -0700 (PDT) X-Google-Smtp-Source: APiQypIWd8TKgGTYrIEAmeZnNuD+DJrdN5SYUD+9PRI33XMUg4xvCeLOBEoB111lD1Ag3CZWhEiI X-Received: by 2002:aa7:d718:: with SMTP id t24mr2769316edq.20.1588255003415; Thu, 30 Apr 2020 06:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588255003; cv=none; d=google.com; s=arc-20160816; b=UMCUDkl5HDiillrMZ352+l3HomyKVhEyajW8MKXUmpYWSGePZFU8myTT7PBENQFqdg dEGrZYnL17mlEROCUM1xS6nq8ZH0fcYD7+l1yN5iC7opSiPEA841mFE3ooXi4aHdDNpg fmmSSWFibvng2ndsXAtSXRhn0Oa8sQQIo3+LuOvgXRcwG8qymNxkO6Yg1l1GSRuAkdSU XimwJm2d5K6roYWuIITKuoO6i9ViKyv+5jyEZHPVmaR0YbSgKMe9udhuBjrlNqKptYPX Otm7LfuQoIgurVjgrNAJvT4haD+BCUi4+sM9YMuzIgnnY10ldLqKGA4eziurMlg9ryIO C5Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TQJXP65BNbRCzHKWnW7LOfd5KSpApzlVSw+4mjIq/f4=; b=bhGsrdb0OpzvZZpkv2GY0qdEB+u+8c3zREOSJrny48x8cNGonQeDNcqd7oP88hILuJ qjy+7KTZpFxU5XC9XMazHykMM5pihdKH48K540ws+CpCH0ISEaEv1YwPr4CrBHbwFKQr IsKPbFZrAB5CO7LlYYQp/NB55hoNqxQEu4pOGu/JwnSGtmeuamxadqcXPVwH2QzYLyhE 2kinj6+w1buiec0ynZhdJpcpxMl3XKX85oFgS0WWKU1ujavkJc/+YtUUapB5WZEQAK30 7EXI+WLVeDHlDiNNAifQ80+JZ8VbOJUJO5eR7HIXkcwqHqakSdrdmfbhkUOfGJ/Oxud/ c9Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zGaw4tyz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id d4si5968662edo.434.2020.04.30.06.56.19; Thu, 30 Apr 2020 06:56:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zGaw4tyz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728846AbgD3Nx4 (ORCPT + 99 others); Thu, 30 Apr 2020 09:53:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:34990 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727768AbgD3NxQ (ORCPT ); Thu, 30 Apr 2020 09:53:16 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 9EB1E21775; Thu, 30 Apr 2020 13:53:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588254796; bh=iwModBdYnSBiQuxKQuEKfO9ES8TM7ARRk9PlkKU5/ZA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zGaw4tyzBsraI7PY2+Ngh+G1M+GS/LGvS/AA2XRkDWeFVIm1qYYrj7FAzunbKHi2+ KMRFrv9WUPeyxCS3zIHtlJT4GVCQRKDMtoozEy7v2NFOm2+ZrZIsw5kjEWMQGiJBUn lwYGWWIkXJSG6izF7cCvFwYtu8woH0hiPejBvPUQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: David Howells , Sasha Levin , linux-afs@lists.infradead.org Subject: [PATCH AUTOSEL 5.4 51/57] afs: Fix to actually set AFS_SERVER_FL_HAVE_EPOCH Date: Thu, 30 Apr 2020 09:52:12 -0400 Message-Id: <20200430135218.20372-51-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200430135218.20372-1-sashal@kernel.org> References: <20200430135218.20372-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Howells [ Upstream commit 69cf3978f3ada4e54beae4ad44868b5627864884 ] AFS keeps track of the epoch value from the rxrpc protocol to note (a) when a fileserver appears to have restarted and (b) when different endpoints of a fileserver do not appear to be associated with the same fileserver (ie. all probes back from a fileserver from all of its interfaces should carry the same epoch). However, the AFS_SERVER_FL_HAVE_EPOCH flag that indicates that we've received the server's epoch is never set, though it is used. Fix this to set the flag when we first receive an epoch value from a probe sent to the filesystem client from the fileserver. Fixes: 3bf0fb6f33dd ("afs: Probe multiple fileservers simultaneously") Signed-off-by: David Howells Signed-off-by: Sasha Levin --- fs/afs/cmservice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index b378cd780ed54..fc5eb0f893049 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c @@ -169,7 +169,7 @@ static int afs_record_cm_probe(struct afs_call *call, struct afs_server *server) spin_lock(&server->probe_lock); - if (!test_bit(AFS_SERVER_FL_HAVE_EPOCH, &server->flags)) { + if (!test_and_set_bit(AFS_SERVER_FL_HAVE_EPOCH, &server->flags)) { server->cm_epoch = call->epoch; server->probe.cm_epoch = call->epoch; goto out; -- 2.20.1