Re: [PATCH] fuse: use current creds for backing files

From: Miklos Szeredi

Date: Tue May 12 2026 - 02:23:26 EST


On Sun, 10 May 2026 at 16:54, <zhaoguohan@xxxxxxxxxx> wrote:
>
> From: GuoHan Zhao <zhaoguohan@xxxxxxxxxx>
>
> FUSE backing files only need a stable snapshot of the current credentials
> for later backing-file I/O. prepare_creds() allocates a mutable copy and
> can fail, but this code never modifies or commits the result.
>
> Use get_current_cred() instead and store it as a const pointer. This
> matches the rest of the backing-file helpers and avoids an unnecessary
> allocation and failure path.
>
> Signed-off-by: GuoHan Zhao <zhaoguohan@xxxxxxxxxx>

Applied, thanks.

Miklos