Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157335
b: refs/heads/master
c: d8e180d
h: refs/heads/master
i:
  157333: 9a97d55
  157331: 55206fa
  157327: b8fba86
v: v3
  • Loading branch information
Michal Schmidt authored and James Morris committed Aug 24, 2009
1 parent 7c23403 commit b69b382
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 939a9421eb53d3ea83188ae13802779041caefdb
refs/heads/master: d8e180dcd5bbbab9cd3ff2e779efcf70692ef541
8 changes: 7 additions & 1 deletion trunk/kernel/acct.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,13 +491,17 @@ static void do_acct_process(struct bsd_acct_struct *acct,
u64 run_time;
struct timespec uptime;
struct tty_struct *tty;
const struct cred *orig_cred;

/* Perform file operations on behalf of whoever enabled accounting */
orig_cred = override_creds(file->f_cred);

/*
* First check to see if there is enough free_space to continue
* the process accounting system.
*/
if (!check_free_space(acct, file))
return;
goto out;

/*
* Fill the accounting struct with the needed info as recorded
Expand Down Expand Up @@ -578,6 +582,8 @@ static void do_acct_process(struct bsd_acct_struct *acct,
sizeof(acct_t), &file->f_pos);
current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim;
set_fs(fs);
out:
revert_creds(orig_cred);
}

/**
Expand Down

0 comments on commit b69b382

Please sign in to comment.