Message ID | 20220225165219.737025658@goodmis.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index bafc02bf8220..3638d330ff5a 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -264,7 +264,6 @@ static int tracefs_parse_options(char *data, struct tracefs_mount_opts *opts) if (!gid_valid(gid)) return -EINVAL; opts->gid = gid; - set_gid(tracefs_mount->mnt_root, gid); break; case Opt_mode: if (match_octal(&args[0], &option)) @@ -293,6 +292,9 @@ static int tracefs_apply_options(struct super_block *sb) inode->i_uid = opts->uid; inode->i_gid = opts->gid; + if (tracefs_mount && tracefs_mount->mnt_root) + set_gid(tracefs_mount->mnt_root, opts->gid); + return 0; }