diff options
| author | Al Viro <[email protected]> | 2025-02-24 01:04:30 +0000 |
|---|---|---|
| committer | Al Viro <[email protected]> | 2025-06-11 17:34:51 +0000 |
| commit | a97dc087da06b69ae976765d59810ca705e8dae1 (patch) | |
| tree | 75f57b4f443ffcb910d89f979c2c4bf2c4d2208a /Documentation/filesystems/caching/netfs-api.rst | |
| parent | tracefs: Add d_delete to remove negative dentries (diff) | |
| download | kernel-a97dc087da06b69ae976765d59810ca705e8dae1.tar.gz kernel-a97dc087da06b69ae976765d59810ca705e8dae1.zip | |
simple_lookup(): just set DCACHE_DONTCACHE
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
and tracefs; both have ->d_delete() returning 1 on anything fed to
simple_lookup(), so both would be fine with simple_lookup() setting
DCACHE_DONTCACHE regardless of ->d_op.
IOW, we might want to drop the check for ->d_op in simple_lookup();
it's definitely a separate story, though.
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'Documentation/filesystems/caching/netfs-api.rst')
0 files changed, 0 insertions, 0 deletions
