17 |
|
|
18 |
#include "priv.h" |
#include "priv.h" |
19 |
#include "fs_S.h" |
#include "fs_S.h" |
20 |
#include "ourfs_notify_U.h" |
#include "fs_notify_U.h" |
21 |
|
|
22 |
kern_return_t |
kern_return_t |
23 |
diskfs_S_dir_notice_changes (struct protid *cred, |
diskfs_S_dir_notice_changes (struct protid *cred, |
37 |
mutex_unlock (&np->lock); |
mutex_unlock (&np->lock); |
38 |
return ENOTDIR; |
return ENOTDIR; |
39 |
} |
} |
40 |
err = nowait_dir_changed (notify, DIR_CHANGED_NULL, ""); |
err = dir_changed (notify, np->dirmod_tick, DIR_CHANGED_NULL, ""); |
41 |
if (err) |
if (err) |
42 |
{ |
{ |
43 |
mutex_unlock (&np->lock); |
mutex_unlock (&np->lock); |
63 |
error_t err; |
error_t err; |
64 |
struct modreq **preq; |
struct modreq **preq; |
65 |
|
|
66 |
|
dp->dirmod_tick++; |
67 |
preq = &dp->dirmod_reqs; |
preq = &dp->dirmod_reqs; |
68 |
while (*preq) |
while (*preq) |
69 |
{ |
{ |
70 |
struct modreq *req = *preq; |
struct modreq *req = *preq; |
71 |
err = nowait_dir_changed (req->port, type, name); |
err = dir_changed (req->port, dp->dirmod_tick, type, name); |
72 |
if (err) |
if (err && err != MACH_SEND_TIMED_OUT) |
73 |
{ /* remove notify port */ |
{ |
74 |
|
/* Remove notify port. */ |
75 |
*preq = req->next; |
*preq = req->next; |
76 |
mach_port_deallocate (mach_task_self (), req->port); |
mach_port_deallocate (mach_task_self (), req->port); |
77 |
free (req); |
free (req); |