Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp188216ima; Sat, 20 Oct 2018 05:28:37 -0700 (PDT) X-Google-Smtp-Source: ACcGV6121lQeyhBXXG1YV0x1HURb9af/zDZDmLzd4ysAOZua8uJ3/ckvxbBv4ncM/Xn7ctGHtoKl X-Received: by 2002:a17:902:d208:: with SMTP id t8-v6mr38104423ply.22.1540038517398; Sat, 20 Oct 2018 05:28:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540038517; cv=none; d=google.com; s=arc-20160816; b=oHq6uNqgYzBkKhQZM0rcjDS9x5kr2gihQ1rSN6Lx/B6BqGbM15Te80+AJpZXWdujOs T/2RrwXj6nQixCGWFJCeo2c8aPCrG7kH7UOcZF8/865Qg+E8Kj8n0vOdd0id+OlisNbA L1exOZiNSrvoHO1hgoDejW3MgnscmSS2IGaAuGS58PRhjTWlmIVgYklB4yKFWyCrcwn6 MAHU96oyRzgZ46jedrLZ1HBHqZKayL6yKu7EAyeltbNirzUEQHOlE+ih24bH+AQfFViO +W7VRc8Y6Q7DU+CK2kNDaMcjvaToMd+NfA6obcvsoRoQnoEQK61cGJTlYfU9KvX3DfcQ M4Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Z0PQFHWGdrYnwJs6XZ6zNs8szvTAKO0yWflxb//vODA=; b=th428btBDejOOk2XLOHtvWMBW6Ne4KvTdGzEUJmgntovOsfpGuzjbYKPwHuL93sx/K 8kodNKGFqMm+217mXoqBXwGPgJ+gZj0bsnqBJXiotgYNDwGxSOCLhJ5DlgFKtbygiJ0w wx3jOM8vQY72R2kY7JPAHBR3eeSvE/xJeUOuUD6/bjiuwQUP5fTuEvxuNn6betFJl6u6 l79ZiGQqeJm3jWXAwDsmVb3M/IXZluYs/EpkbXaTI1Ufb3qXqz4kLylzoN8maH7kV44j o312F1TbVDDuUZLAFr8lk/OaYUCUWxwARSn8+15Wfi2Tr7aYggXd4bgZmS/t6mF65CHJ xmfA== 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 p9-v6si26923248pgm.560.2018.10.20.05.27.47; Sat, 20 Oct 2018 05:28:37 -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; 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 S1727401AbeJTUhV (ORCPT + 99 others); Sat, 20 Oct 2018 16:37:21 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:50874 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727289AbeJTUhV (ORCPT ); Sat, 20 Oct 2018 16:37:21 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gDqLK-0004xv-5e; Sat, 20 Oct 2018 12:26:58 +0000 Date: Sat, 20 Oct 2018 13:26:58 +0100 From: Al Viro To: Alan Jenkins Cc: David Howells , torvalds@linux-foundation.org, ebiederm@xmission.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, mszeredi@redhat.com Subject: Re: [PATCH 03/34] teach move_mount(2) to work with OPEN_TREE_CLONE [ver #12] Message-ID: <20181020122658.GN32577@ZenIV.linux.org.uk> References: <97872123-70be-2833-ea7a-a463ce204b53@gmail.com> <862e36a2-2a6f-4e26-3228-8cab4b4cf230@gmail.com> <153754740781.17872.7869536526927736855.stgit@warthog.procyon.org.uk> <153754743491.17872.12115848333103740766.stgit@warthog.procyon.org.uk> <6518.1539956277@warthog.procyon.org.uk> <29902.1539988579@warthog.procyon.org.uk> <209e8c35-d26e-0a29-84d7-b8b1d0ecbebc@gmail.com> <20181020114826.GM32577@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181020114826.GM32577@ZenIV.linux.org.uk> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 20, 2018 at 12:48:26PM +0100, Al Viro wrote: > Not just refcounting; it's that fs_pin is really intended to have ->kill() > triggered only once. If you look at the pin_kill() (which is where the > livelock happened) More specifically, it's group_pin_kill() assuming that by the time pin_kill() returns it either will have called to pin_remove() or will have waited for one to complete. Either way, the object will be gone from the list, so we do get progress. Livelock comes since the object has already been through pin_remove() once and then got reinserted into the list. Now pin_kill() returns immediately and we keep spinning on the element that doesn't go away.