git: 7fbeaf33b8e1 - main - tmpfs: drop useless parent locking from tmpfs_dir_getdotdotdent
Mateusz Guzik
mjg at FreeBSD.org
Sat May 29 22:04:23 UTC 2021
The branch main has been updated by mjg:
URL: https://cgit.FreeBSD.org/src/commit/?id=7fbeaf33b8e1a5e69af42a77c78a6fcb3029f1ca
commit 7fbeaf33b8e1a5e69af42a77c78a6fcb3029f1ca
Author: Mateusz Guzik <mjg at FreeBSD.org>
AuthorDate: 2021-05-29 15:38:21 +0000
Commit: Mateusz Guzik <mjg at FreeBSD.org>
CommitDate: 2021-05-29 22:04:10 +0000
tmpfs: drop useless parent locking from tmpfs_dir_getdotdotdent
The id field is immutable until the node gets freed.
---
sys/fs/tmpfs/tmpfs_subr.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index 8b75c58d69a2..df5bc12047be 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -1436,10 +1436,7 @@ tmpfs_dir_getdotdotdent(struct tmpfs_mount *tm, struct tmpfs_node *node,
if (parent == NULL)
return (ENOENT);
- TMPFS_NODE_LOCK(parent);
dent.d_fileno = parent->tn_id;
- TMPFS_NODE_UNLOCK(parent);
-
dent.d_off = next;
dent.d_type = DT_DIR;
dent.d_namlen = 2;
More information about the dev-commits-src-main
mailing list