• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/autofs/

Lines Matching refs:wq

28 	struct autofs_wait_queue *wq, *nwq;
33 wq = sbi->queues;
35 while ( wq ) {
36 nwq = wq->next;
37 wq->status = -ENOENT; /* Magic is gone - report failure */
38 kfree(wq->name);
39 wq->name = NULL;
40 wake_up(&wq->queue);
41 wq = nwq;
83 static void autofs_notify_daemon(struct autofs_sb_info *sbi, struct autofs_wait_queue *wq)
87 DPRINTK(("autofs_wait: wait id = 0x%08lx, name = ", wq->wait_queue_token));
88 autofs_say(wq->name,wq->len);
94 pkt.wait_queue_token = wq->wait_queue_token;
95 pkt.len = wq->len;
96 memcpy(pkt.name, wq->name, pkt.len);
105 struct autofs_wait_queue *wq;
116 for ( wq = sbi->queues ; wq ; wq = wq->next ) {
117 if ( wq->hash == name->hash &&
118 wq->len == name->len &&
119 wq->name && !memcmp(wq->name,name->name,name->len) )
123 if ( !wq ) {
125 wq = kmalloc(sizeof(struct autofs_wait_queue),GFP_KERNEL);
126 if ( !wq )
129 wq->name = kmalloc(name->len,GFP_KERNEL);
130 if ( !wq->name ) {
131 kfree(wq);
134 wq->wait_queue_token = autofs_next_wait_queue++;
135 init_waitqueue_head(&wq->queue);
136 wq->hash = name->hash;
137 wq->len = name->len;
138 wq->status = -EINTR; /* Status return if interrupted */
139 memcpy(wq->name, name->name, name->len);
140 wq->next = sbi->queues;
141 sbi->queues = wq;
144 wq->wait_ctr = 2;
145 autofs_notify_daemon(sbi,wq);
147 wq->wait_ctr++;
149 /* wq->name is NULL if and only if the lock is already released */
153 wq->status = -ENOENT;
154 kfree(wq->name);
155 wq->name = NULL;
158 if ( wq->name ) {
165 interruptible_sleep_on(&wq->queue);
172 status = wq->status;
174 if ( ! --wq->wait_ctr ) /* Are we the last process to need status? */
175 kfree(wq);
183 struct autofs_wait_queue *wq, **wql;
185 for (wql = &sbi->queues; (wq = *wql) != NULL; wql = &wq->next) {
186 if ( wq->wait_queue_token == wait_queue_token )
189 if ( !wq )
192 *wql = wq->next; /* Unlink from chain */
193 kfree(wq->name);
194 wq->name = NULL; /* Do not wait on this queue */
196 wq->status = status;
198 if ( ! --wq->wait_ctr ) /* Is anyone still waiting for this guy? */
199 kfree(wq);
201 wake_up(&wq->queue);