aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/tmpfs/tmpfs.h
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2021-01-23 13:45:01 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2021-01-23 15:04:43 +0000
commit618029af508be2c01a84162c1bad02bfd000db27 (patch)
tree586a41591df686d42cd67b80150a7be6a5e02581 /sys/fs/tmpfs/tmpfs.h
parentc892d60a1d3e11c7e0651705bc4167b218a7415c (diff)
downloadsrc-618029af508be2c01a84162c1bad02bfd000db27.tar.gz
src-618029af508be2c01a84162c1bad02bfd000db27.zip
tmpfs: add support for lockless symlink lookup
Reviewed by: kib (previous version) Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D27488
Diffstat (limited to 'sys/fs/tmpfs/tmpfs.h')
-rw-r--r--sys/fs/tmpfs/tmpfs.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h
index 811df5b2936f..28493a550252 100644
--- a/sys/fs/tmpfs/tmpfs.h
+++ b/sys/fs/tmpfs/tmpfs.h
@@ -277,7 +277,10 @@ struct tmpfs_node {
/* Valid when tn_type == VLNK. */
/* The link's target, allocated from a string pool. */
- char * tn_link; /* (c) */
+ struct tn_link {
+ char * tn_link_target; /* (c) */
+ char tn_link_smr; /* (c) */
+ } tn_link;
/* Valid when tn_type == VREG. */
struct tn_reg {
@@ -300,7 +303,8 @@ LIST_HEAD(tmpfs_node_list, tmpfs_node);
#define tn_rdev tn_spec.tn_rdev
#define tn_dir tn_spec.tn_dir
-#define tn_link tn_spec.tn_link
+#define tn_link_target tn_spec.tn_link.tn_link_target
+#define tn_link_smr tn_spec.tn_link.tn_link_smr
#define tn_reg tn_spec.tn_reg
#define tn_fifo tn_spec.tn_fifo