summaryrefslogtreecommitdiffstats
path: root/kernel/acct.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/acct.c')
-rw-r--r--kernel/acct.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/acct.c b/kernel/acct.c
index 7e64105a8..fdadf7a9f 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -150,12 +150,12 @@ asmlinkage long sys_acct(const char *name)
{
struct file *file = NULL, *old_acct = NULL;
char *tmp;
- int error = -EPERM;
+ int error;
- lock_kernel();
if (!capable(CAP_SYS_PACCT))
- goto out;
+ return -EPERM;
+ lock_kernel();
if (name) {
tmp = getname(name);
error = PTR_ERR(tmp);
@@ -257,8 +257,6 @@ static comp_t encode_comp_t(unsigned long value)
* into the accounting file. This function should only be called from
* do_exit().
*/
-#define KSTK_EIP(stack) (((unsigned long *)(stack))[1019])
-#define KSTK_ESP(stack) (((unsigned long *)(stack))[1022])
/*
* do_acct_process does all actual work.