Re: [PATCH 03/34] teach move_mount(2) to work with OPEN_TREE_CLONE [ver #12]

From: Al Viro
Date: Sat Oct 20 2018 - 08:27:20 EST


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.