[PATCH 14/16] act: use credential guards in acct_write_process()
Linus Torvalds
torvalds at linux-foundation.org
Tue Nov 4 10:04:28 AEDT 2025
On Mon, 3 Nov 2025 at 20:27, Christian Brauner <brauner at kernel.org> wrote:
>
> /* Perform file operations on behalf of whoever enabled accounting */
> - cred = override_creds(file->f_cred);
> -
> + with_creds(file->f_cred);
I'd almost prefer if we *only* did "scoped_with_creds()" and didn't
have this version at all.
Most of the cases want that anyway, and the couple of plain
"with_creds()" cases look like they would only be cleaned up by making
the cred scoping more explicit.
What do you think?
Anyway, I approve of the whole series, obviously, I just suspect we
could narrow down the new interface a bit more.
Linus
More information about the Linux-erofs
mailing list