]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ovl: pass an explicit reference of creators creds to callers
authorAmir Goldstein <amir73il@gmail.com>
Thu, 14 Nov 2024 08:36:35 +0000 (09:36 +0100)
committerAmir Goldstein <amir73il@gmail.com>
Thu, 14 Nov 2024 12:15:46 +0000 (13:15 +0100)
commit711747e204ead127235aa41b350e518e92a87fcc
treece95f3deeb06147510da6a1596bebe5b5a214b14
parentfc5a1d2287bf23f67da1fc7a178cf26c5e6ba9d0
ovl: pass an explicit reference of creators creds to callers

ovl_setup_cred_for_create() decrements one refcount of new creds and
ovl_revert_creds() in callers decrements the last refcount.

In preparation to revert_creds_light() back to caller creds, pass an
explicit reference of the creators creds to the callers and drop the
refcount explicitly in the callers after ovl_revert_creds().

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
fs/overlayfs/dir.c