Re: [PATCH v2 10/21] simple_lookup(): just set DCACHE_DONTCACHE

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

 



On Wed, Jun 11, 2025 at 08:54:26AM +0100, Al Viro wrote:
> No need to mess with ->d_op at all.  Note that ->d_delete that always
> returns 1 is equivalent to having DCACHE_DONTCACHE in ->d_flags.
> Later the same thing will be placed into ->s_d_flags of the filesystems
> where we want that behaviour for all dentries; then the check in
> simple_lookup() will at least get unlikely() slapped on it.
> 
> NOTE: there are only two filesystems where
> 	* simple_lookup() might be called
> 	* default ->d_op is non-NULL
> 	* its ->d_delete() doesn't always return 1
> If not for those, we could have simple_lookup() just set DCACHE_DONTCACHE
> without even looking at ->d_op.  Filesystems in question are btrfs
> (where ->d_delete() takes care to recognize the dentries that might
> come from simple_lookup() and returns 1 for those) and tracefs.
> 
> The former would be fine with simple_lookup() setting DCACHE_DONTCACHE;
> the latter... probably wants DCACHE_DONTCACHE in default d_flags.
> 
> IOW, we might want to drop the check for ->d_op in simple_lookup();
> it's definitely a separate story, though.
> 
> Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> ---

Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>




[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