diff options
| author | NeilBrown <neil@brown.name> | 2026-10-21 19:56:57 +1100 |
|---|---|---|
| committer | Miklos Szeredi <mszeredi@mszeredi-thinkpadt14gen6.rmthu.csb> | 2026-11-02 12:41:16 +0100 |
| commit | aa0c00a516faac6683c7fb0a4f1032f471f910f7 (patch) | |
| tree | 9baf7cb81b90daefc77b6e2c5a982f33a383a56a /tools/perf/scripts | |
| parent | 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 (diff) | |
fuse: Use d_alloc_trylock() in fuse_direntplus_link()
fuse uses the results of readdir to prime the dcache. Using
d_alloc_parallel() can block if there is a concurrent lookup. Blocking
in that case is pointless as the lookup will add info to the dcache and
there is no value in the readdir waiting to see if it should add the
info too.
Also this call to d_alloc_parallel() is made while the parent
directory is locked. A proposed change to locking will lock the parent
later, after d_alloc_parallel(). This means it won't be safe to wait in
d_alloc_parallel() while holding the directory lock.
So change to use d_alloc_trylock(), which doesn't require full_name_hash
and d_lookup to be called first.
If d_alloc_trylock() fails with -EWOULDBLOCK or for any other reason,
the consequence is only that fuse_force_forget() is called, which is
required to keep the lookup count on the node consistent between client
and server. It does not cause the readdir to fail.
Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions
