summaryrefslogtreecommitdiff
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-11-14 23:45:26 +0100
committerChristian Brauner <brauner@kernel.org>2025-11-19 21:58:27 +0100
commit2c42b6ce4a3ba5b781b0138517c89fb2a736ed8f (patch)
treea3e6b5d578a0f49bf7c8b6824e8b6bfa47aaad99 /fs/overlayfs
parent72f098f0dd045e18938284ec210256b7e601ccf7 (diff)
ovl: remove struct ovl_cu_creds and associated functions
Now that we have this all ported to a cred guard remove the struct and the associated helpers. Link: https://patch.msgid.link/20251114-work-ovl-cred-guard-copyup-v1-5-ea3fb15cf427@kernel.org Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r--fs/overlayfs/copy_up.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
index 71e222e5044d..758611ee4475 100644
--- a/fs/overlayfs/copy_up.c
+++ b/fs/overlayfs/copy_up.c
@@ -724,34 +724,6 @@ static int ovl_copy_up_metadata(struct ovl_copy_up_ctx *c, struct dentry *temp)
return err;
}
-struct ovl_cu_creds {
- const struct cred *old;
- struct cred *new;
-};
-
-static int __maybe_unused ovl_prep_cu_creds(struct dentry *dentry, struct ovl_cu_creds *cc)
-{
- int err;
-
- cc->old = cc->new = NULL;
- err = security_inode_copy_up(dentry, &cc->new);
- if (err < 0)
- return err;
-
- if (cc->new)
- cc->old = override_creds(cc->new);
-
- return 0;
-}
-
-static void __maybe_unused ovl_revert_cu_creds(struct ovl_cu_creds *cc)
-{
- if (cc->new) {
- revert_creds(cc->old);
- put_cred(cc->new);
- }
-}
-
static const struct cred *ovl_prepare_copy_up_creds(struct dentry *dentry)
{
struct cred *copy_up_cred = NULL;