Re: [RFC][CFT][PATCH] Rewrite of propagate_umount() (was Re: [BUG] propagate_umount() breakage)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 19 May 2025 at 14:35, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
>         What trim_one(A) does instead is
> * note that A itself needs to be removed
> * remove B and D

Yeah, I wondered, but it wasn't obvious from the flow that the same
list was getting changed...  But now that you point it out, it's
fairly obvious in trim_one -> trim_ancestors -> remove_candidate().

I did see the direct call to remove_candidate(), but that only
affected 'A' itself.

And I guess passing the list head around wouldn't have helped make
that flow more obvious, because the removal is through the list head,
it's just that list_del_init() on the list entry.

A comment may have helped, just because I found that list traversal
pattern so odd. But yes

>  [..]  Then the loop would turn into
>
>        while !empty(candidates)
>                trim_one(first candidate)

would have made me not think it's oddly written.

            Linus




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux