Skip to content

Commit 2c42b6c

Browse files
committed
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>
1 parent 72f098f commit 2c42b6c

1 file changed

Lines changed: 0 additions & 28 deletions

File tree

fs/overlayfs/copy_up.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -724,34 +724,6 @@ static int ovl_copy_up_metadata(struct ovl_copy_up_ctx *c, struct dentry *temp)
724724
return err;
725725
}
726726

727-
struct ovl_cu_creds {
728-
const struct cred *old;
729-
struct cred *new;
730-
};
731-
732-
static int __maybe_unused ovl_prep_cu_creds(struct dentry *dentry, struct ovl_cu_creds *cc)
733-
{
734-
int err;
735-
736-
cc->old = cc->new = NULL;
737-
err = security_inode_copy_up(dentry, &cc->new);
738-
if (err < 0)
739-
return err;
740-
741-
if (cc->new)
742-
cc->old = override_creds(cc->new);
743-
744-
return 0;
745-
}
746-
747-
static void __maybe_unused ovl_revert_cu_creds(struct ovl_cu_creds *cc)
748-
{
749-
if (cc->new) {
750-
revert_creds(cc->old);
751-
put_cred(cc->new);
752-
}
753-
}
754-
755727
static const struct cred *ovl_prepare_copy_up_creds(struct dentry *dentry)
756728
{
757729
struct cred *copy_up_cred = NULL;

0 commit comments

Comments
 (0)