]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Double unlock in BSD accounting speedup patch
authorIngo Molnar <mingo@elte.hu>
Mon, 7 Jul 2003 05:51:59 +0000 (22:51 -0700)
committerIngo Molnar <mingo@elte.hu>
Mon, 7 Jul 2003 05:51:59 +0000 (22:51 -0700)
doh - double unlock in the acct-is-on path. Noticed by Aneesh Kumar K.V
<aneesh.kumar@digital.com>

kernel/acct.c

index 028e310bd15f1add9bbd238337d2f45f9b90bedf..0009dfb25dcbbcec8f715a050318af0797f06e70 100644 (file)
@@ -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);
 }