X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/cb3231590a3c94ab4375e2228bd5e86b0cf1ad7e..94ff46dc2849db4d43eaaf144872decc522aafb4:/bsd/kern/bsd_init.c diff --git a/bsd/kern/bsd_init.c b/bsd/kern/bsd_init.c index 3e2052fb0..bc5b709e0 100644 --- a/bsd/kern/bsd_init.c +++ b/bsd/kern/bsd_init.c @@ -168,6 +168,7 @@ #include /* for restricted_in_port_init() */ #include /* for assert() */ #include /* for init_system_override() */ +#include /* for lf_init() */ #include @@ -315,6 +316,8 @@ __private_extern__ int bootarg_vnode_cache_defeat = 0; __private_extern__ int bootarg_no_vnode_jetsam = 0; #endif /* CONFIG_JETSAM && (DEVELOPMENT || DEBUG) */ +__private_extern__ int bootarg_no_vnode_drain = 0; + /* * Prevent kernel-based ASLR from being used, for testing. */ @@ -760,6 +763,10 @@ bsd_init(void) bsd_init_kprintf("calling vfsinit\n"); vfsinit(); + /* Initialize file locks. */ + bsd_init_kprintf("calling lf_init\n"); + lf_init(); + #if CONFIG_PROC_UUID_POLICY /* Initial proc_uuid_policy subsystem */ bsd_init_kprintf("calling proc_uuid_policy_init()\n"); @@ -1331,6 +1338,9 @@ parse_bsd_args(void) } #endif /* CONFIG_JETSAM && (DEVELOPMENT || DEBUG) */ + if (PE_parse_boot_argn("-no_vnode_drain", namep, sizeof(namep))) { + bootarg_no_vnode_drain = 1; + } #if CONFIG_EMBEDDED /*