- ctx = vfs_context_current();
-
-#if CONFIG_PROTECT
- {
-#if 0 // <rdar://11771612>
-
- if ((error = cp_vnode_setclass(vp, PROTECTION_CLASS_F))) {
- if(config_protect_bug) {
- printf("swap protection class set failed with %d\n", error);
- } else {
- panic("swap protection class set failed with %d\n", error);
- }
- }
-#endif
- /* initialize content protection keys manually */
- if ((error = cp_handle_vnop(vp, CP_WRITE_ACCESS, 0)) != 0) {
- printf("Content Protection key failure on swap: %d\n", error);
- vnode_put(vp);
- vp = NULL;
- goto done;
- }
- }
-#endif