diff options
author | Yang Yang <[email protected]> | 2021-09-07 19:58:18 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2021-09-08 11:50:26 -0700 |
commit | 3c91dda97eea704ac257ddb138d1154adab8db62 (patch) | |
tree | 8f510dcf5cca69de323726f264058f45159c94bd | |
parent | 18821693b97bd5601d796a41ecc7da9cc2766769 (diff) |
kernel/acct.c: use dedicated helper to access rlimit values
Use rlimit() helper instead of manually writing whole chain from
task to rlimit value. See patch "posix-cpu-timers: Use dedicated
helper to access rlimit values".
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Yang Yang <[email protected]>
Reported-by: Zeal Robot <[email protected]>
Cc: Randy Dunlap <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Yang Yang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | kernel/acct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index a64102be2bb0..23a7ab8e6cbc 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -478,7 +478,7 @@ static void do_acct_process(struct bsd_acct_struct *acct) /* * Accounting records are not subject to resource limits. */ - flim = current->signal->rlim[RLIMIT_FSIZE].rlim_cur; + flim = rlimit(RLIMIT_FSIZE); current->signal->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY; /* Perform file operations on behalf of whoever enabled accounting */ orig_cred = override_creds(file->f_cred); |