summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d7c4a5f)
Whitespace and formating changes to waitq code.
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sbi->catatonic = 1;
wq = sbi->queues;
sbi->queues = NULL; /* Erase all wait queues */
sbi->catatonic = 1;
wq = sbi->queues;
sbi->queues = NULL; /* Erase all wait queues */
nwq = wq->next;
wq->status = -ENOENT; /* Magic is gone - report failure */
kfree(wq->name);
nwq = wq->next;
wq->status = -ENOENT; /* Magic is gone - report failure */
kfree(wq->name);
fput(sbi->pipe); /* Close the pipe */
sbi->pipe = NULL;
}
fput(sbi->pipe); /* Close the pipe */
sbi->pipe = NULL;
}
shrink_dcache_sb(sbi->sb);
}
shrink_dcache_sb(sbi->sb);
}
int len, status;
/* In catatonic mode, we don't wait for nobody */
int len, status;
/* In catatonic mode, we don't wait for nobody */
return -ENOENT;
name = kmalloc(NAME_MAX + 1, GFP_KERNEL);
return -ENOENT;
name = kmalloc(NAME_MAX + 1, GFP_KERNEL);
/* Can't wait for an expire if there's no mount */
if (notify == NFY_NONE && !d_mountpoint(dentry)) {
kfree(name);
/* Can't wait for an expire if there's no mount */
if (notify == NFY_NONE && !d_mountpoint(dentry)) {
kfree(name);
/* Create a new wait queue */
wq = kmalloc(sizeof(struct autofs_wait_queue),GFP_KERNEL);
/* Create a new wait queue */
wq = kmalloc(sizeof(struct autofs_wait_queue),GFP_KERNEL);
kfree(name);
mutex_unlock(&sbi->wq_mutex);
return -ENOMEM;
kfree(name);
mutex_unlock(&sbi->wq_mutex);
return -ENOMEM;
/* wq->name is NULL if and only if the lock is already released */
/* wq->name is NULL if and only if the lock is already released */
- if ( sbi->catatonic ) {
/* We might have slept, so check again for catatonic mode */
wq->status = -ENOENT;
kfree(wq->name);
wq->name = NULL;
}
/* We might have slept, so check again for catatonic mode */
wq->status = -ENOENT;
kfree(wq->name);
wq->name = NULL;
}
/* Block all but "shutdown" signals while waiting */
sigset_t oldset;
unsigned long irqflags;
/* Block all but "shutdown" signals while waiting */
sigset_t oldset;
unsigned long irqflags;
struct autofs_wait_queue *wq, **wql;
mutex_lock(&sbi->wq_mutex);
struct autofs_wait_queue *wq, **wql;
mutex_lock(&sbi->wq_mutex);
- for ( wql = &sbi->queues ; (wq = *wql) != 0 ; wql = &wq->next ) {
- if ( wq->wait_queue_token == wait_queue_token )
+ for (wql = &sbi->queues ; (wq = *wql) != 0 ; wql = &wq->next) {
+ if (wq->wait_queue_token == wait_queue_token)
mutex_unlock(&sbi->wq_mutex);
return -EINVAL;
}
mutex_unlock(&sbi->wq_mutex);
return -EINVAL;
}