diff options
| author | Ingo Molnar <mingo@elte.hu> | 2003-07-06 22:51:59 -0700 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2003-07-06 22:51:59 -0700 |
| commit | 395b6e1dc40be8a1515f577f3c9f52508d965c96 (patch) | |
| tree | 87bc0af1b013a41ee9ec1e26da0adf5cccebf72c | |
| parent | c7b0b16d48bcd2c2bade56a1c3a662475881674c (diff) | |
[PATCH] Double unlock in BSD accounting speedup patch
doh - double unlock in the acct-is-on path. Noticed by Aneesh Kumar K.V
<aneesh.kumar@digital.com>
| -rw-r--r-- | kernel/acct.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index 028e310bd15f..0009dfb25dcb 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -406,14 +406,13 @@ void acct_process(long exitcode) spin_lock(&acct_globals.lock); file = acct_globals.file; - if (!file) - goto out_unlock; - + if (unlikely(!file)) { + spin_unlock(&acct_globals.lock); + return; + } get_file(file); spin_unlock(&acct_globals.lock); + do_acct_process(exitcode, file); fput(file); - -out_unlock: - spin_unlock(&acct_globals.lock); } |
