Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147872270
D3675.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
D3675.diff
View Options
Index: head/sys/kern/vfs_subr.c
===================================================================
--- head/sys/kern/vfs_subr.c
+++ head/sys/kern/vfs_subr.c
@@ -4345,6 +4345,15 @@
}
void
+vop_reclaim_post(void *ap, int rc)
+{
+ struct vop_reclaim_args *a = ap;
+
+ if (!rc)
+ VFS_KNOTE_LOCKED(a->a_vp, NOTE_REVOKE);
+}
+
+void
vop_remove_post(void *ap, int rc)
{
struct vop_remove_args *a = ap;
@@ -4624,7 +4633,7 @@
* filesystem is gone, so set the EOF flag and schedule
* the knote for deletion.
*/
- if (hint == NOTE_REVOKE) {
+ if (hint == NOTE_REVOKE || (hint == 0 && vp->v_type == VBAD)) {
VI_LOCK(vp);
kn->kn_flags |= (EV_EOF | EV_ONESHOT);
VI_UNLOCK(vp);
@@ -4653,7 +4662,7 @@
* filesystem is gone, so set the EOF flag and schedule
* the knote for deletion.
*/
- if (hint == NOTE_REVOKE)
+ if (hint == NOTE_REVOKE || (hint == 0 && vp->v_type == VBAD))
kn->kn_flags |= (EV_EOF | EV_ONESHOT);
kn->kn_data = 0;
@@ -4670,7 +4679,7 @@
VI_LOCK(vp);
if (kn->kn_sfflags & hint)
kn->kn_fflags |= hint;
- if (hint == NOTE_REVOKE) {
+ if (hint == NOTE_REVOKE || (hint == 0 && vp->v_type == VBAD)) {
kn->kn_flags |= EV_EOF;
VI_UNLOCK(vp);
return (1);
Index: head/sys/kern/vnode_if.src
===================================================================
--- head/sys/kern/vnode_if.src
+++ head/sys/kern/vnode_if.src
@@ -355,6 +355,7 @@
%% reclaim vp E E E
+%! reclaim post vop_reclaim_post
vop_reclaim {
IN struct vnode *vp;
Index: head/sys/sys/vnode.h
===================================================================
--- head/sys/sys/vnode.h
+++ head/sys/sys/vnode.h
@@ -781,6 +781,7 @@
void vop_lookup_pre(void *a);
void vop_mkdir_post(void *a, int rc);
void vop_mknod_post(void *a, int rc);
+void vop_reclaim_post(void *a, int rc);
void vop_remove_post(void *a, int rc);
void vop_rename_post(void *a, int rc);
void vop_rename_pre(void *a);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 15, 8:26 AM (7 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29708932
Default Alt Text
D3675.diff (1 KB)
Attached To
Mode
D3675: kevent(2): Trigger notes on DOOMED vnodes
Attached
Detach File
Event Timeline
Log In to Comment