* vnode removal operation */
| 1063 | * vnode removal operation |
| 1064 | */ |
| 1065 | static int |
| 1066 | mqfs_remove(struct vop_remove_args *ap) |
| 1067 | { |
| 1068 | struct mqfs_info *mqfs = VFSTOMQFS(ap->a_dvp->v_mount); |
| 1069 | struct mqfs_node *pn; |
| 1070 | int error; |
| 1071 | |
| 1072 | if (ap->a_vp->v_type == VDIR) |
| 1073 | return (EPERM); |
| 1074 | pn = VTON(ap->a_vp); |
| 1075 | sx_xlock(&mqfs->mi_lock); |
| 1076 | error = do_unlink(pn, ap->a_cnp->cn_cred); |
| 1077 | sx_xunlock(&mqfs->mi_lock); |
| 1078 | return (error); |
| 1079 | } |
| 1080 | |
| 1081 | #if 0 |
| 1082 | struct vop_inactive_args { |
nothing calls this directly
no test coverage detected