summaryrefslogtreecommitdiffstats
path: root/kernel/acct.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2010-05-18 08:57:00 +1000
committerJames Morris <jmorris@namei.org>2010-05-18 08:57:00 +1000
commit539c99fd7fc28f8db257c713c10fb4aceadf8887 (patch)
treee603e48ac816cde56e4872e0f7bcdfe7bd33f3b3 /kernel/acct.c
parentba2e1c5f25a99dec3873745031ad23ce3fd79bff (diff)
parent4d09ec0f705cf88a12add029c058b53f288cfaa2 (diff)
downloadlinux-539c99fd7fc28f8db257c713c10fb4aceadf8887.tar.gz
linux-539c99fd7fc28f8db257c713c10fb4aceadf8887.tar.bz2
linux-539c99fd7fc28f8db257c713c10fb4aceadf8887.zip
Merge branch 'next' into for-linus
Diffstat (limited to 'kernel/acct.c')
-rw-r--r--kernel/acct.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/kernel/acct.c b/kernel/acct.c
index e4c0e1fee9b0..385b88461c29 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -216,7 +216,6 @@ static int acct_on(char *name)
{
struct file *file;
struct vfsmount *mnt;
- int error;
struct pid_namespace *ns;
struct bsd_acct_struct *acct = NULL;
@@ -244,13 +243,6 @@ static int acct_on(char *name)
}
}
- error = security_acct(file);
- if (error) {
- kfree(acct);
- filp_close(file, NULL);
- return error;
- }
-
spin_lock(&acct_lock);
if (ns->bacct == NULL) {
ns->bacct = acct;
@@ -281,7 +273,7 @@ static int acct_on(char *name)
*/
SYSCALL_DEFINE1(acct, const char __user *, name)
{
- int error;
+ int error = 0;
if (!capable(CAP_SYS_PACCT))
return -EPERM;
@@ -299,13 +291,11 @@ SYSCALL_DEFINE1(acct, const char __user *, name)
if (acct == NULL)
return 0;
- error = security_acct(NULL);
- if (!error) {
- spin_lock(&acct_lock);
- acct_file_reopen(acct, NULL, NULL);
- spin_unlock(&acct_lock);
- }
+ spin_lock(&acct_lock);
+ acct_file_reopen(acct, NULL, NULL);
+ spin_unlock(&acct_lock);
}
+
return error;
}