diff options
| author | Shakeel Butt <shakeel.butt@linux.dev> | 2026-09-11 11:28:13 -0700 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-09-17 12:08:52 +0200 |
| commit | 45126ed80bb1c5eaf3d83aebc963826798d555b9 (patch) | |
| tree | 6c65d5f931988eb302d38ae86a7b64d00bf805d6 /tools/lib/python | |
| parent | 5ebcb578adeec7407dd501108ab2f423ca8e3e55 (diff) | |
| download | linux-next-45126ed80bb1c5eaf3d83aebc963826798d555b9.tar.gz linux-next-45126ed80bb1c5eaf3d83aebc963826798d555b9.zip | |
kernfs: resume readdir on the full entry key
readdir resumes at the entry pinned in file->private_data, and falls back
to the hash in ctx->pos when that entry is gone. Two entries in one
directory can share a hash, so the hash alone does not say where the
listing stopped.
Copy the name under the lock, emit the copy, and keep it as the resume
key. The pinned entry counts as the same entry only while its name still
matches, and the fallback search starts after (hash, ns, name) rather
than at the first entry with the hash.
No behaviour change yet. kernfs_rwsem is held across the loop, so nothing
can move between two entries of one call, and a resume across getdents(2)
calls has no saved name and keys on the hash as before.
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Link: https://patch.msgid.link/20260911182815.1992483-3-shakeel.butt@linux.dev
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
