347
348 /*
349 * "ddh" (sdev_private) could be NULL if devnet_lookup fails.
350 */
351 if (ddh != NULL)
352 dls_devnet_close(ddh);
353 }
354
355 /*ARGSUSED*/
356 static void
357 devnet_inactive(struct vnode *dvp, struct cred *cred, caller_context_t *ct)
358 {
359 devname_inactive_func(dvp, cred, devnet_inactive_callback);
360 }
361
362 /*
363 * We override lookup and readdir to build entries based on the
364 * in kernel vanity naming node table.
365 */
366 const fs_operation_def_t devnet_vnodeops_tbl[] = {
367 VOPNAME_READDIR, { .vop_readdir = devnet_readdir },
368 VOPNAME_LOOKUP, { .vop_lookup = devnet_lookup },
369 VOPNAME_INACTIVE, { .vop_inactive = devnet_inactive },
370 VOPNAME_CREATE, { .error = fs_nosys },
371 VOPNAME_REMOVE, { .error = fs_nosys },
372 VOPNAME_MKDIR, { .error = fs_nosys },
373 VOPNAME_RMDIR, { .error = fs_nosys },
374 VOPNAME_SYMLINK, { .error = fs_nosys },
375 VOPNAME_SETSECATTR, { .error = fs_nosys },
376 NULL, NULL
377 };
|
347
348 /*
349 * "ddh" (sdev_private) could be NULL if devnet_lookup fails.
350 */
351 if (ddh != NULL)
352 dls_devnet_close(ddh);
353 }
354
355 /*ARGSUSED*/
356 static void
357 devnet_inactive(struct vnode *dvp, struct cred *cred, caller_context_t *ct)
358 {
359 devname_inactive_func(dvp, cred, devnet_inactive_callback);
360 }
361
362 /*
363 * We override lookup and readdir to build entries based on the
364 * in kernel vanity naming node table.
365 */
366 const fs_operation_def_t devnet_vnodeops_tbl[] = {
367 { VOPNAME_READDIR, { .vop_readdir = devnet_readdir } },
368 { VOPNAME_LOOKUP, { .vop_lookup = devnet_lookup } },
369 { VOPNAME_INACTIVE, { .vop_inactive = devnet_inactive } },
370 { VOPNAME_CREATE, { .error = fs_nosys } },
371 { VOPNAME_REMOVE, { .error = fs_nosys } },
372 { VOPNAME_MKDIR, { .error = fs_nosys } },
373 { VOPNAME_RMDIR, { .error = fs_nosys } },
374 { VOPNAME_SYMLINK, { .error = fs_nosys } },
375 { VOPNAME_SETSECATTR, { .error = fs_nosys } },
376 { NULL, { NULL } }
377 };
|