• Home
  • Raw
  • Download

Lines Matching refs:wq

17 	struct autofs_wait_queue *wq, *nwq;  in autofs_catatonic_mode()  local
28 wq = sbi->queues; in autofs_catatonic_mode()
30 while (wq) { in autofs_catatonic_mode()
31 nwq = wq->next; in autofs_catatonic_mode()
32 wq->status = -ENOENT; /* Magic is gone - report failure */ in autofs_catatonic_mode()
33 kfree(wq->name.name); in autofs_catatonic_mode()
34 wq->name.name = NULL; in autofs_catatonic_mode()
35 wake_up_interruptible(&wq->queue); in autofs_catatonic_mode()
36 if (!--wq->wait_ctr) in autofs_catatonic_mode()
37 kfree(wq); in autofs_catatonic_mode()
38 wq = nwq; in autofs_catatonic_mode()
80 struct autofs_wait_queue *wq, in autofs_notify_daemon() argument
93 (unsigned long) wq->wait_queue_token, in autofs_notify_daemon()
94 wq->name.len, wq->name.name, type); in autofs_notify_daemon()
109 mp->wait_queue_token = wq->wait_queue_token; in autofs_notify_daemon()
110 mp->len = wq->name.len; in autofs_notify_daemon()
111 memcpy(mp->name, wq->name.name, wq->name.len); in autofs_notify_daemon()
112 mp->name[wq->name.len] = '\0'; in autofs_notify_daemon()
122 ep->wait_queue_token = wq->wait_queue_token; in autofs_notify_daemon()
123 ep->len = wq->name.len; in autofs_notify_daemon()
124 memcpy(ep->name, wq->name.name, wq->name.len); in autofs_notify_daemon()
125 ep->name[wq->name.len] = '\0'; in autofs_notify_daemon()
142 packet->wait_queue_token = wq->wait_queue_token; in autofs_notify_daemon()
143 packet->len = wq->name.len; in autofs_notify_daemon()
144 memcpy(packet->name, wq->name.name, wq->name.len); in autofs_notify_daemon()
145 packet->name[wq->name.len] = '\0'; in autofs_notify_daemon()
146 packet->dev = wq->dev; in autofs_notify_daemon()
147 packet->ino = wq->ino; in autofs_notify_daemon()
148 packet->uid = from_kuid_munged(user_ns, wq->uid); in autofs_notify_daemon()
149 packet->gid = from_kgid_munged(user_ns, wq->gid); in autofs_notify_daemon()
150 packet->pid = wq->pid; in autofs_notify_daemon()
151 packet->tgid = wq->tgid; in autofs_notify_daemon()
170 autofs_wait_release(sbi, wq->wait_queue_token, ret); in autofs_notify_daemon()
227 struct autofs_wait_queue *wq; in autofs_find_wait() local
229 for (wq = sbi->queues; wq; wq = wq->next) { in autofs_find_wait()
230 if (wq->name.hash == qstr->hash && in autofs_find_wait()
231 wq->name.len == qstr->len && in autofs_find_wait()
232 wq->name.name && in autofs_find_wait()
233 !memcmp(wq->name.name, qstr->name, qstr->len)) in autofs_find_wait()
236 return wq; in autofs_find_wait()
253 struct autofs_wait_queue *wq; in validate_request() local
260 wq = autofs_find_wait(sbi, qstr); in validate_request()
261 if (wq) { in validate_request()
262 *wait = wq; in validate_request()
294 wq = autofs_find_wait(sbi, qstr); in validate_request()
295 if (wq) { in validate_request()
296 *wait = wq; in validate_request()
352 struct autofs_wait_queue *wq; in autofs_wait() local
410 ret = validate_request(&wq, sbi, &qstr, path, notify); in autofs_wait()
418 if (!wq) { in autofs_wait()
420 wq = kmalloc(sizeof(struct autofs_wait_queue), GFP_KERNEL); in autofs_wait()
421 if (!wq) { in autofs_wait()
427 wq->wait_queue_token = autofs_next_wait_queue; in autofs_wait()
430 wq->next = sbi->queues; in autofs_wait()
431 sbi->queues = wq; in autofs_wait()
432 init_waitqueue_head(&wq->queue); in autofs_wait()
433 memcpy(&wq->name, &qstr, sizeof(struct qstr)); in autofs_wait()
434 wq->dev = autofs_get_dev(sbi); in autofs_wait()
435 wq->ino = autofs_get_ino(sbi); in autofs_wait()
436 wq->uid = current_uid(); in autofs_wait()
437 wq->gid = current_gid(); in autofs_wait()
438 wq->pid = pid; in autofs_wait()
439 wq->tgid = tgid; in autofs_wait()
440 wq->status = -EINTR; /* Status return if interrupted */ in autofs_wait()
441 wq->wait_ctr = 2; in autofs_wait()
460 (unsigned long) wq->wait_queue_token, wq->name.len, in autofs_wait()
461 wq->name.name, notify); in autofs_wait()
466 autofs_notify_daemon(sbi, wq, type); in autofs_wait()
468 wq->wait_ctr++; in autofs_wait()
470 (unsigned long) wq->wait_queue_token, wq->name.len, in autofs_wait()
471 wq->name.name, notify); in autofs_wait()
480 wait_event_killable(wq->queue, wq->name.name == NULL); in autofs_wait()
481 status = wq->status; in autofs_wait()
508 ino->uid = wq->uid; in autofs_wait()
509 ino->gid = wq->gid; in autofs_wait()
519 if (!--wq->wait_ctr) in autofs_wait()
520 kfree(wq); in autofs_wait()
530 struct autofs_wait_queue *wq, **wql; in autofs_wait_release() local
533 for (wql = &sbi->queues; (wq = *wql) != NULL; wql = &wq->next) { in autofs_wait_release()
534 if (wq->wait_queue_token == wait_queue_token) in autofs_wait_release()
538 if (!wq) { in autofs_wait_release()
543 *wql = wq->next; /* Unlink from chain */ in autofs_wait_release()
544 kfree(wq->name.name); in autofs_wait_release()
545 wq->name.name = NULL; /* Do not wait on this queue */ in autofs_wait_release()
546 wq->status = status; in autofs_wait_release()
547 wake_up(&wq->queue); in autofs_wait_release()
548 if (!--wq->wait_ctr) in autofs_wait_release()
549 kfree(wq); in autofs_wait_release()