Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102916409
D39382.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
D39382.diff
View Options
diff --git a/sys/fs/pseudofs/pseudofs_internal.h b/sys/fs/pseudofs/pseudofs_internal.h
--- a/sys/fs/pseudofs/pseudofs_internal.h
+++ b/sys/fs/pseudofs/pseudofs_internal.h
@@ -156,9 +156,10 @@
{
PFS_TRACE(("%s", pn->pn_name));
- KASSERT(pn->pn_vis != NULL, ("%s(): no callback", __func__));
- KASSERT(p != NULL, ("%s(): no process", __func__));
- PROC_LOCK_ASSERT(p, MA_OWNED);
+ if (pn->pn_vis == NULL)
+ return (1);
+ if (p != NULL)
+ PROC_LOCK_ASSERT(p, MA_OWNED);
pfs_assert_not_owned(pn);
return ((pn->pn_vis)(PFS_VIS_ARGNAMES));
}
diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c
--- a/sys/fs/pseudofs/pseudofs_vnops.c
+++ b/sys/fs/pseudofs/pseudofs_vnops.c
@@ -119,7 +119,7 @@
if (p)
*p = NULL;
if (pid == NO_PID)
- PFS_RETURN (1);
+ PFS_RETURN (pn_vis(td, NULL, pn));
proc = pfind(pid);
if (proc == NULL)
PFS_RETURN (0);
@@ -826,7 +826,7 @@
} else if (proc != NULL) {
visible = pfs_visible_proc(td, *pn, proc);
} else {
- visible = 1;
+ visible = pn_vis(td, NULL, *pn);
}
if (!visible)
goto again;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 5:31 PM (21 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14720488
Default Alt Text
D39382.diff (1 KB)
Attached To
Mode
D39382: pseudofs: Allow vis callback to be called for a named node
Attached
Detach File
Event Timeline
Log In to Comment