summaryrefslogtreecommitdiff
path: root/fs/efivarfs/inode.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-11-04 08:54:20 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2023-11-04 08:54:20 -1000
commit4c975a43fa380676828321ebe5b662c743c14d9e (patch)
tree2a3fbc35e2c62ab14cd93f295b1e58d27e820fa0 /fs/efivarfs/inode.c
parent0a23fb262d17f587c9bb1e6cc83ad4158b21f16e (diff)
parent5329aa5101f73c451bcd48deaf3f296685849d9c (diff)
Merge tag 'efi-next-for-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
Pull EFI update from Ard Biesheuvel: "This is the only remaining EFI change, as everything else was taken via -tip this cycle: - implement uid/gid mount options for efivarfs" * tag 'efi-next-for-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efivarfs: Add uid/gid mount options
Diffstat (limited to 'fs/efivarfs/inode.c')
-rw-r--r--fs/efivarfs/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/efivarfs/inode.c b/fs/efivarfs/inode.c
index 76dd3c7295d9..91290fe4a70b 100644
--- a/fs/efivarfs/inode.c
+++ b/fs/efivarfs/inode.c
@@ -21,8 +21,12 @@ struct inode *efivarfs_get_inode(struct super_block *sb,
dev_t dev, bool is_removable)
{
struct inode *inode = new_inode(sb);
+ struct efivarfs_fs_info *fsi = sb->s_fs_info;
+ struct efivarfs_mount_opts *opts = &fsi->mount_opts;
if (inode) {
+ inode->i_uid = opts->uid;
+ inode->i_gid = opts->gid;
inode->i_ino = get_next_ino();
inode->i_mode = mode;
simple_inode_init_ts(inode);