File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ int proc_setup_thread_self(struct super_block *s)
38
38
struct inode * root_inode = d_inode (s -> s_root );
39
39
struct pid_namespace * ns = proc_pid_ns (root_inode );
40
40
struct dentry * thread_self ;
41
+ int ret = - ENOMEM ;
41
42
42
43
inode_lock (root_inode );
43
44
thread_self = d_alloc_name (s -> s_root , "thread-self" );
@@ -51,20 +52,19 @@ int proc_setup_thread_self(struct super_block *s)
51
52
inode -> i_gid = GLOBAL_ROOT_GID ;
52
53
inode -> i_op = & proc_thread_self_inode_operations ;
53
54
d_add (thread_self , inode );
55
+ ret = 0 ;
54
56
} else {
55
57
dput (thread_self );
56
- thread_self = ERR_PTR (- ENOMEM );
57
58
}
58
- } else {
59
- thread_self = ERR_PTR (- ENOMEM );
60
59
}
61
60
inode_unlock (root_inode );
62
- if (IS_ERR (thread_self )) {
61
+
62
+ if (ret )
63
63
pr_err ("proc_fill_super: can't allocate /proc/thread_self\n" );
64
- return PTR_ERR ( thread_self );
65
- }
66
- ns -> proc_thread_self = thread_self ;
67
- return 0 ;
64
+ else
65
+ ns -> proc_thread_self = thread_self ;
66
+
67
+ return ret ;
68
68
}
69
69
70
70
void __init proc_thread_self_init (void )
You can’t perform that action at this time.
0 commit comments