aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/vnode.h
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2020-12-28 03:01:15 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2021-01-03 06:50:06 +0000
commit3e506a67bbcc76aada3c3fa4e499502184272c07 (patch)
treeedca825407e5808b88f2289a283750951742c6a8 /sys/sys/vnode.h
parent51bf55fa6c780734b201f22b5f6ee4092fd979ef (diff)
downloadsrc-3e506a67bbcc76aada3c3fa4e499502184272c07.tar.gz
src-3e506a67bbcc76aada3c3fa4e499502184272c07.zip
vfs: add v_irflag accessors
Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D27793
Diffstat (limited to 'sys/sys/vnode.h')
-rw-r--r--sys/sys/vnode.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index f77c5bc4827a..107cf45f9602 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -797,6 +797,14 @@ void vn_seqc_write_end(struct vnode *vp);
#define vn_rangelock_trywlock(vp, start, end) \
rangelock_trywlock(&(vp)->v_rl, (start), (end), VI_MTX(vp))
+#define vn_irflag_read(vp) atomic_load_short(&(vp)->v_irflag)
+void vn_irflag_set_locked(struct vnode *vp, short toset);
+void vn_irflag_set(struct vnode *vp, short toset);
+void vn_irflag_set_cond_locked(struct vnode *vp, short toset);
+void vn_irflag_set_cond(struct vnode *vp, short toset);
+void vn_irflag_unset_locked(struct vnode *vp, short tounset);
+void vn_irflag_unset(struct vnode *vp, short tounset);
+
int vfs_cache_lookup(struct vop_lookup_args *ap);
int vfs_cache_root(struct mount *mp, int flags, struct vnode **vpp);
void vfs_timestamp(struct timespec *);
@@ -979,7 +987,7 @@ do { \
#define VOP_UNSET_TEXT_CHECKED(vp) VOP_UNSET_TEXT((vp))
#endif
-#define VN_IS_DOOMED(vp) __predict_false((vp)->v_irflag & VIRF_DOOMED)
+#define VN_IS_DOOMED(vp) __predict_false((vn_irflag_read(vp) & VIRF_DOOMED) != 0)
void vput(struct vnode *vp);
void vrele(struct vnode *vp);