kernel/fs: Check HAS_FS_CALL(..., open_dir) in open_dir_vnode.
All filesystems have open_dir calls in their vnode hooks, but there are some vnode hooks that do not, like FIFOs. Thus we need to check the hook actually exists. Fixes #17870.
This commit is contained in:
parent
e4e1e6e4f5
commit
8ba3797e85
@ -5534,6 +5534,9 @@ create_vnode(struct vnode* directory, const char* name, int openMode,
|
||||
static int
|
||||
open_dir_vnode(struct vnode* vnode, bool kernel)
|
||||
{
|
||||
if (!HAS_FS_CALL(vnode, open_dir))
|
||||
return B_UNSUPPORTED;
|
||||
|
||||
void* cookie;
|
||||
status_t status = FS_CALL(vnode, open_dir, &cookie);
|
||||
if (status != B_OK)
|
||||
|
Loading…
Reference in New Issue
Block a user