diff options
author | Vinicius Costa Gomes <vinicius.gomes@intel.com> | 2024-11-05 20:35:13 +0100 |
---|---|---|
committer | Amir Goldstein <amir73il@gmail.com> | 2024-11-11 10:45:04 +0100 |
commit | fc5a1d2287bf23f67da1fc7a178cf26c5e6ba9d0 (patch) | |
tree | fd28954219ab7b03dca47b63b4dff89488cd81b7 /fs/overlayfs/util.c | |
parent | fs/backing-file: Convert to revert/override_creds_light() (diff) | |
download | linux-fc5a1d2287bf23f67da1fc7a178cf26c5e6ba9d0.tar.xz linux-fc5a1d2287bf23f67da1fc7a178cf26c5e6ba9d0.zip |
ovl: use wrapper ovl_revert_creds()
Introduce ovl_revert_creds() wrapper of revert_creds() to
match callers of ovl_override_creds().
Suggested-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'fs/overlayfs/util.c')
-rw-r--r-- | fs/overlayfs/util.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c index edc9216f6e27..9408046f4f41 100644 --- a/fs/overlayfs/util.c +++ b/fs/overlayfs/util.c @@ -68,6 +68,11 @@ const struct cred *ovl_override_creds(struct super_block *sb) return override_creds(ofs->creator_cred); } +void ovl_revert_creds(const struct cred *old_cred) +{ + revert_creds(old_cred); +} + /* * Check if underlying fs supports file handles and try to determine encoding * type, in order to deduce maximum inode number used by fs. @@ -1178,7 +1183,7 @@ int ovl_nlink_start(struct dentry *dentry) * value relative to the upper inode nlink in an upper inode xattr. */ err = ovl_set_nlink_upper(dentry); - revert_creds(old_cred); + ovl_revert_creds(old_cred); if (err) goto out_drop_write; @@ -1203,7 +1208,7 @@ void ovl_nlink_end(struct dentry *dentry) old_cred = ovl_override_creds(dentry->d_sb); ovl_cleanup_index(dentry); - revert_creds(old_cred); + ovl_revert_creds(old_cred); } ovl_inode_unlock(inode); |