diff options
Diffstat (limited to 'include/linux/pid.h')
-rw-r--r-- | include/linux/pid.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/pid.h b/include/linux/pid.h index 1484db6ca8d1..2a83e434db9d 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <linux/rculist.h> | 5 | #include <linux/rculist.h> |
6 | #include <linux/wait.h> | 6 | #include <linux/wait.h> |
7 | #include <linux/refcount.h> | ||
7 | 8 | ||
8 | enum pid_type | 9 | enum pid_type |
9 | { | 10 | { |
@@ -57,7 +58,7 @@ struct upid { | |||
57 | 58 | ||
58 | struct pid | 59 | struct pid |
59 | { | 60 | { |
60 | atomic_t count; | 61 | refcount_t count; |
61 | unsigned int level; | 62 | unsigned int level; |
62 | /* lists of tasks that use this pid */ | 63 | /* lists of tasks that use this pid */ |
63 | struct hlist_head tasks[PIDTYPE_MAX]; | 64 | struct hlist_head tasks[PIDTYPE_MAX]; |
@@ -74,7 +75,7 @@ extern const struct file_operations pidfd_fops; | |||
74 | static inline struct pid *get_pid(struct pid *pid) | 75 | static inline struct pid *get_pid(struct pid *pid) |
75 | { | 76 | { |
76 | if (pid) | 77 | if (pid) |
77 | atomic_inc(&pid->count); | 78 | refcount_inc(&pid->count); |
78 | return pid; | 79 | return pid; |
79 | } | 80 | } |
80 | 81 | ||