Skip to contentSkip to conversation

acct: Use dedicated helper to access rlimit values

PATCH Applied [email protected] 1 participant 1 message Jul 28, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acct: Use dedicated helper to access rlimit values

From: Yang Yang <[email protected]>

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".

---
 kernel/acct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/acct.c +1 -1
index a64102be2bb0..23a7ab8e6cbc 100644
@@ -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);
Signature · 1 line
2.25.1