diff options
author | Ian Kent <raven@themaw.net> | 2006-03-27 04:14:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:44:40 -0500 |
commit | e77fbddf77c071a5735a4bc63a30649bd64baf14 (patch) | |
tree | b16e27d3672e44f30c917f9b648c68bec799156b /fs/autofs4 | |
parent | d7c4a5f1080a61fd4a3a00ba5f741986f8fb71f0 (diff) |
[PATCH] autofs4: white space cleanup for waitq.c
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>
Diffstat (limited to 'fs/autofs4')
-rw-r--r-- | fs/autofs4/waitq.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index be78e9378c03..b0bb9d43bcd9 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c | |||
@@ -33,7 +33,7 @@ void autofs4_catatonic_mode(struct autofs_sb_info *sbi) | |||
33 | sbi->catatonic = 1; | 33 | sbi->catatonic = 1; |
34 | wq = sbi->queues; | 34 | wq = sbi->queues; |
35 | sbi->queues = NULL; /* Erase all wait queues */ | 35 | sbi->queues = NULL; /* Erase all wait queues */ |
36 | while ( wq ) { | 36 | while (wq) { |
37 | nwq = wq->next; | 37 | nwq = wq->next; |
38 | wq->status = -ENOENT; /* Magic is gone - report failure */ | 38 | wq->status = -ENOENT; /* Magic is gone - report failure */ |
39 | kfree(wq->name); | 39 | kfree(wq->name); |
@@ -45,7 +45,6 @@ void autofs4_catatonic_mode(struct autofs_sb_info *sbi) | |||
45 | fput(sbi->pipe); /* Close the pipe */ | 45 | fput(sbi->pipe); /* Close the pipe */ |
46 | sbi->pipe = NULL; | 46 | sbi->pipe = NULL; |
47 | } | 47 | } |
48 | |||
49 | shrink_dcache_sb(sbi->sb); | 48 | shrink_dcache_sb(sbi->sb); |
50 | } | 49 | } |
51 | 50 | ||
@@ -165,7 +164,7 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry, | |||
165 | int len, status; | 164 | int len, status; |
166 | 165 | ||
167 | /* In catatonic mode, we don't wait for nobody */ | 166 | /* In catatonic mode, we don't wait for nobody */ |
168 | if ( sbi->catatonic ) | 167 | if (sbi->catatonic) |
169 | return -ENOENT; | 168 | return -ENOENT; |
170 | 169 | ||
171 | name = kmalloc(NAME_MAX + 1, GFP_KERNEL); | 170 | name = kmalloc(NAME_MAX + 1, GFP_KERNEL); |
@@ -190,7 +189,7 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry, | |||
190 | break; | 189 | break; |
191 | } | 190 | } |
192 | 191 | ||
193 | if ( !wq ) { | 192 | if (!wq) { |
194 | /* Can't wait for an expire if there's no mount */ | 193 | /* Can't wait for an expire if there's no mount */ |
195 | if (notify == NFY_NONE && !d_mountpoint(dentry)) { | 194 | if (notify == NFY_NONE && !d_mountpoint(dentry)) { |
196 | kfree(name); | 195 | kfree(name); |
@@ -200,7 +199,7 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry, | |||
200 | 199 | ||
201 | /* Create a new wait queue */ | 200 | /* Create a new wait queue */ |
202 | wq = kmalloc(sizeof(struct autofs_wait_queue),GFP_KERNEL); | 201 | wq = kmalloc(sizeof(struct autofs_wait_queue),GFP_KERNEL); |
203 | if ( !wq ) { | 202 | if (!wq) { |
204 | kfree(name); | 203 | kfree(name); |
205 | mutex_unlock(&sbi->wq_mutex); | 204 | mutex_unlock(&sbi->wq_mutex); |
206 | return -ENOMEM; | 205 | return -ENOMEM; |
@@ -240,14 +239,14 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry, | |||
240 | 239 | ||
241 | /* wq->name is NULL if and only if the lock is already released */ | 240 | /* wq->name is NULL if and only if the lock is already released */ |
242 | 241 | ||
243 | if ( sbi->catatonic ) { | 242 | if (sbi->catatonic) { |
244 | /* We might have slept, so check again for catatonic mode */ | 243 | /* We might have slept, so check again for catatonic mode */ |
245 | wq->status = -ENOENT; | 244 | wq->status = -ENOENT; |
246 | kfree(wq->name); | 245 | kfree(wq->name); |
247 | wq->name = NULL; | 246 | wq->name = NULL; |
248 | } | 247 | } |
249 | 248 | ||
250 | if ( wq->name ) { | 249 | if (wq->name) { |
251 | /* Block all but "shutdown" signals while waiting */ | 250 | /* Block all but "shutdown" signals while waiting */ |
252 | sigset_t oldset; | 251 | sigset_t oldset; |
253 | unsigned long irqflags; | 252 | unsigned long irqflags; |
@@ -283,12 +282,12 @@ int autofs4_wait_release(struct autofs_sb_info *sbi, autofs_wqt_t wait_queue_tok | |||
283 | struct autofs_wait_queue *wq, **wql; | 282 | struct autofs_wait_queue *wq, **wql; |
284 | 283 | ||
285 | mutex_lock(&sbi->wq_mutex); | 284 | mutex_lock(&sbi->wq_mutex); |
286 | for ( wql = &sbi->queues ; (wq = *wql) != 0 ; wql = &wq->next ) { | 285 | for (wql = &sbi->queues ; (wq = *wql) != 0 ; wql = &wq->next) { |
287 | if ( wq->wait_queue_token == wait_queue_token ) | 286 | if (wq->wait_queue_token == wait_queue_token) |
288 | break; | 287 | break; |
289 | } | 288 | } |
290 | 289 | ||
291 | if ( !wq ) { | 290 | if (!wq) { |
292 | mutex_unlock(&sbi->wq_mutex); | 291 | mutex_unlock(&sbi->wq_mutex); |
293 | return -EINVAL; | 292 | return -EINVAL; |
294 | } | 293 | } |