We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
current!
1 parent d19c6e5 commit 092c6f4Copy full SHA for 092c6f4
rust/kernel/task.rs
@@ -173,7 +173,7 @@ impl Task {
173
/// Returns the given task's pid in the current pid namespace.
174
pub fn pid_in_current_ns(&self) -> Pid {
175
// SAFETY: Calling `task_active_pid_ns` with the current task is always safe.
176
- let namespace = unsafe { bindings::task_active_pid_ns(bindings::get_current()) };
+ let namespace = unsafe { bindings::task_active_pid_ns(current!().as_raw()) };
177
// SAFETY: We know that `self.raw()` is valid by the type invariant.
178
unsafe { bindings::task_tgid_nr_ns(self.as_raw(), namespace) }
179
}
0 commit comments