Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3327227imu; Sun, 11 Nov 2018 12:27:26 -0800 (PST) X-Google-Smtp-Source: AJdET5fxhPIsikSyBAAVurWJbs2C4eGAgCRNxFSMIBaYv6mRWUQ2kRam7EvHha3jwQ3Upb37t4A4 X-Received: by 2002:a62:da54:: with SMTP id w20-v6mr17445790pfl.106.1541968046564; Sun, 11 Nov 2018 12:27:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968046; cv=none; d=google.com; s=arc-20160816; b=sAXXyMrmGO5DuyCqZnJTpc0aINV2/2w/ly6HWPLrm6a1F2/MQ8OsqkQI8o4vLQTcOT D1YeV1RR4Ev3Z7pnLJRDzYecFj1HuSntrqg6lj8wD7roP9uRWEpW/zbw8kGNG20XpXMe UHxGaxbvWnh9EC/ygMpjPjiyFH99w29Q5j0pJYBmqLn9usT44LLEFN/Ce6IJtTtRtNea pUnSS9UY5YXANCrCLtCpkuQTVOvMYA7K4qotysqQ8jQuavkuX4hLvwoonWtt1S2+UZg3 Phr29GSJ/Og9RaSfAp7azbR7NmpNJeKe5kg/n/kdC3LVizv1rtchrl8VhhQy3SjpAZMx AXag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=4L56OVuUL9jgVcsbFzwv81Ztv1STQWhuMCheK0xP3kM=; b=BDCpjk5jEeMlT+Ik8F2CYJ1M/1TDOVleLVdG0LPlq4jwEE206R+OVZTtWSQW03hzLv 1UipiU1O+rUmWmm10mKhh46XTyiVJozaB06dnY2TLngaKlYKvJh+uN1M2Bc5G9URyMBb NZgoptroGkD+od9AEyRG2rqBFJLM5vl2Q8yXufLx6PaYCAxJnQCLG1ghFDUuCTD4rSCf gC9lHrc8fV37DeRriOzYKcaeIHJzFJpOkhPSpLNN2ztjMv1Tzti+mHr1iEoT/y/osnOy 9RpMSvqpAKboN3zfc4V89415IcvROPnyoQHsp0Gu+LswQ25+5nzRv5j2oCiaWDOWOc1q qetw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj7-v6si15280852plb.193.2018.11.11.12.27.11; Sun, 11 Nov 2018 12:27:26 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731239AbeKLGQJ (ORCPT + 99 others); Mon, 12 Nov 2018 01:16:09 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:50874 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730635AbeKLFs1 (ORCPT ); Mon, 12 Nov 2018 00:48:27 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsl-0000oU-Lf; Sun, 11 Nov 2018 19:58:55 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsY-0001mQ-8k; Sun, 11 Nov 2018 19:58:42 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Kiran Kumar Modukuri" , "David Howells" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 292/366] cachefiles: Wait rather than BUG'ing on "Unexpected object collision" In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Kiran Kumar Modukuri commit c2412ac45a8f8f1cd582723c1a139608694d410d upstream. If we meet a conflicting object that is marked FSCACHE_OBJECT_IS_LIVE in the active object tree, we have been emitting a BUG after logging information about it and the new object. Instead, we should wait for the CACHEFILES_OBJECT_ACTIVE flag to be cleared on the old object (or return an error). The ACTIVE flag should be cleared after it has been removed from the active object tree. A timeout of 60s is used in the wait, so we shouldn't be able to get stuck there. Fixes: 9ae326a69004 ("CacheFiles: A cache that backs onto a mounted filesystem") Signed-off-by: Kiran Kumar Modukuri Signed-off-by: David Howells Signed-off-by: Ben Hutchings --- fs/cachefiles/namei.c | 1 - 1 file changed, 1 deletion(-) --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -194,7 +194,6 @@ wait_for_old_object: pr_err("\n"); pr_err("Error: Unexpected object collision\n"); cachefiles_printk_object(object, xobject); - BUG(); } atomic_inc(&xobject->usage); write_unlock(&cache->active_lock);