Re: [PATCH v2 1/7] VFS/ovl: add lookup_one_positive_killable()

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

 



On Fri, 12 Sep 2025, Al Viro wrote:
> On Tue, Sep 09, 2025 at 02:43:15PM +1000, NeilBrown wrote:
> 
> > Note that instead of always getting an exclusive lock, ovl now only gets
> > a shared lock, and only sometimes.  The exclusive lock was never needed.
> 
> what it is the locking environment in callers and what stabilizes
> that list hanging off rdd, seeing that you now run through it without
> having dir held exclusive?

rdd is per-thread - always allocated on the stack.
In this case an iterate_dir() call has built a cache of a directory and
the maybe_whiteout and been constructed of everything that is DT_CHR.
Now, outside the readdir lock, we are lookup up each of those to check
if they are really whiteouts.

So no other thread can tough this list at all.

Thanks,
NeilBrown




[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