diff options
| author | David S. Miller <davem@nuts.ninka.net> | 2003-07-08 04:24:04 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2003-07-08 04:24:04 -0700 |
| commit | 6fee4e4eae95a053b1148537c1fe1ee9ff3d7a45 (patch) | |
| tree | fea61da3aecfaa64c024bea99e9216039d61fc5a /kernel/acct.c | |
| parent | 58af6e3af0578edece898ea59261812bad7a3576 (diff) | |
| parent | a1bafab5cbe2ce874fe5b0e012cc9ab74a672b39 (diff) | |
Resolve conflicts in ipconfig.c changes.
Diffstat (limited to 'kernel/acct.c')
| -rw-r--r-- | kernel/acct.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index e63095525ac2..0009dfb25dcb 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -394,17 +394,25 @@ static void do_acct_process(long exitcode, struct file *file) /* * acct_process - now just a wrapper around do_acct_process */ -int acct_process(long exitcode) +void acct_process(long exitcode) { struct file *file = NULL; + + /* + * accelerate the common fastpath: + */ + if (!acct_globals.file) + return; + spin_lock(&acct_globals.lock); - if (acct_globals.file) { - file = acct_globals.file; - get_file(file); + file = acct_globals.file; + if (unlikely(!file)) { spin_unlock(&acct_globals.lock); - do_acct_process(exitcode, file); - fput(file); - } else - spin_unlock(&acct_globals.lock); - return 0; + return; + } + get_file(file); + spin_unlock(&acct_globals.lock); + + do_acct_process(exitcode, file); + fput(file); } |
