- /*
- * Fire off the content modified fsevent for each
- * entry, remove it from the list, and free it.
- */
-#if CONFIG_FSE
- if (nfsrv_fsevents_enabled)
+ /* move each entry to the fire list */
+ nfp = LIST_NEXT(fp, fm_link);
+ LIST_REMOVE(fp, fm_link);
+ fmod_fire++;
+ if (pfp)
+ LIST_INSERT_AFTER(pfp, fp, fm_link);
+ else
+ LIST_INSERT_HEAD(&firehead, fp, fm_link);
+ pfp = fp;
+ fp = nfp;
+ }
+ }
+
+ if (fmod_fire) {
+ lck_mtx_unlock(nfsrv_fmod_mutex);
+ /*
+ * Fire off the content modified fsevent for each
+ * entry and free it.
+ */
+ LIST_FOREACH_SAFE(fp, &firehead, fm_link, nfp) {
+ if (nfsrv_fsevents_enabled) {
+ fp->fm_context.vc_thread = current_thread();