Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136908197
D22664.id65195.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D22664.id65195.diff
View Options
Index: sys/kern/vfs_vnops.c
===================================================================
--- sys/kern/vfs_vnops.c
+++ sys/kern/vfs_vnops.c
@@ -1579,7 +1579,7 @@
("vn_lock: error %d incompatible with flags %#x", error, flags));
if ((flags & LK_RETRY) == 0) {
- if (error == 0 && (vp->v_iflag & VI_DOOMED) != 0) {
+ if (error == 0 && VNODE_IS_DOOMED(vp)) {
VOP_UNLOCK(vp, 0);
error = ENOENT;
}
Index: sys/sys/vnode.h
===================================================================
--- sys/sys/vnode.h
+++ sys/sys/vnode.h
@@ -889,6 +889,17 @@
#define VOP_UNSET_TEXT_CHECKED(vp) VOP_UNSET_TEXT((vp))
#endif
+#define VNODE_IS_DOOMED(vp) ({ \
+ struct vnode *_vp = (vp); \
+ bool _doomed = _vp->v_type == VBAD; \
+ \
+ ASSERT_VOP_LOCKED(_vp, __func__); \
+ if (_doomed) \
+ VNASSERT(_vp->v_iflag & VI_DOOMED, _vp, \
+ ("%s: type is VBAD but vnode is not doomed", __func__));\
+ _doomed; \
+})
+
void vput(struct vnode *vp);
void vrele(struct vnode *vp);
void vref(struct vnode *vp);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 21, 2:34 PM (17 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25770276
Default Alt Text
D22664.id65195.diff (1 KB)
Attached To
Mode
D22664: vfs: eliminate v_iflag read from vn_lock
Attached
Detach File
Event Timeline
Log In to Comment