diff options
author | Ian Kent <raven@themaw.net> | 2008-05-01 07:35:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-01 11:04:01 -0400 |
commit | afec570c32a0d116e3c68af583ed1d11110f12fc (patch) | |
tree | 1246c52aeccc6daa629e4d8daa523573aabe686e /fs | |
parent | c32e026efc1e1a4f9e36babebf123f2b88205b0b (diff) |
autofs4: fix sparse warning in waitq.c:autofs4_expire_indirect()
Re-order some code in expire.c:autofs4_expire_indirect() to avoid compile
warning, reported by Harvey Harrison:
CHECK fs/autofs4/expire.c
fs/autofs4/expire.c:383:2: warning: context imbalance in
'autofs4_expire_indirect' - unexpected unlock
Signed-off-by: Ian Kent <raven@themaw.net>
Reviewed-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/autofs4/expire.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c index d96e5c14a9ca..cfa12db8f41b 100644 --- a/fs/autofs4/expire.c +++ b/fs/autofs4/expire.c | |||
@@ -333,7 +333,7 @@ static struct dentry *autofs4_expire_indirect(struct super_block *sb, | |||
333 | /* Can we expire this guy */ | 333 | /* Can we expire this guy */ |
334 | if (autofs4_can_expire(dentry, timeout, do_now)) { | 334 | if (autofs4_can_expire(dentry, timeout, do_now)) { |
335 | expired = dentry; | 335 | expired = dentry; |
336 | break; | 336 | goto found; |
337 | } | 337 | } |
338 | goto next; | 338 | goto next; |
339 | } | 339 | } |
@@ -352,7 +352,7 @@ static struct dentry *autofs4_expire_indirect(struct super_block *sb, | |||
352 | inf->flags |= AUTOFS_INF_EXPIRING; | 352 | inf->flags |= AUTOFS_INF_EXPIRING; |
353 | spin_unlock(&sbi->fs_lock); | 353 | spin_unlock(&sbi->fs_lock); |
354 | expired = dentry; | 354 | expired = dentry; |
355 | break; | 355 | goto found; |
356 | } | 356 | } |
357 | spin_unlock(&sbi->fs_lock); | 357 | spin_unlock(&sbi->fs_lock); |
358 | /* | 358 | /* |
@@ -363,7 +363,7 @@ static struct dentry *autofs4_expire_indirect(struct super_block *sb, | |||
363 | expired = autofs4_check_leaves(mnt, dentry, timeout, do_now); | 363 | expired = autofs4_check_leaves(mnt, dentry, timeout, do_now); |
364 | if (expired) { | 364 | if (expired) { |
365 | dput(dentry); | 365 | dput(dentry); |
366 | break; | 366 | goto found; |
367 | } | 367 | } |
368 | } | 368 | } |
369 | next: | 369 | next: |
@@ -371,18 +371,16 @@ next: | |||
371 | spin_lock(&dcache_lock); | 371 | spin_lock(&dcache_lock); |
372 | next = next->next; | 372 | next = next->next; |
373 | } | 373 | } |
374 | |||
375 | if (expired) { | ||
376 | DPRINTK("returning %p %.*s", | ||
377 | expired, (int)expired->d_name.len, expired->d_name.name); | ||
378 | spin_lock(&dcache_lock); | ||
379 | list_move(&expired->d_parent->d_subdirs, &expired->d_u.d_child); | ||
380 | spin_unlock(&dcache_lock); | ||
381 | return expired; | ||
382 | } | ||
383 | spin_unlock(&dcache_lock); | 374 | spin_unlock(&dcache_lock); |
384 | |||
385 | return NULL; | 375 | return NULL; |
376 | |||
377 | found: | ||
378 | DPRINTK("returning %p %.*s", | ||
379 | expired, (int)expired->d_name.len, expired->d_name.name); | ||
380 | spin_lock(&dcache_lock); | ||
381 | list_move(&expired->d_parent->d_subdirs, &expired->d_u.d_child); | ||
382 | spin_unlock(&dcache_lock); | ||
383 | return expired; | ||
386 | } | 384 | } |
387 | 385 | ||
388 | /* Perform an expiry operation */ | 386 | /* Perform an expiry operation */ |