We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b99ca60 commit ff78fcaCopy full SHA for ff78fca
fs/proc/root.c
@@ -28,11 +28,12 @@ static int proc_test_super(struct super_block *sb, void *data)
28
29
static int proc_set_super(struct super_block *sb, void *data)
30
{
31
- struct pid_namespace *ns;
32
-
33
- ns = (struct pid_namespace *)data;
34
- sb->s_fs_info = get_pid_ns(ns);
35
- return set_anon_super(sb, NULL);
+ int err = set_anon_super(sb, NULL);
+ if (!err) {
+ struct pid_namespace *ns = (struct pid_namespace *)data;
+ sb->s_fs_info = get_pid_ns(ns);
+ }
36
+ return err;
37
}
38
39
static struct dentry *proc_mount(struct file_system_type *fs_type,
0 commit comments