diff options
| author | Alice Ryhl <[email protected]> | 2024-10-15 14:02:12 +0000 |
|---|---|---|
| committer | Christian Brauner <[email protected]> | 2024-10-15 14:07:02 +0000 |
| commit | fe95f58320e6c8dcea3bcb01336b9a7fdd7f684b (patch) | |
| tree | 39bd880aa8dcd1238f5ff2736d23e510faac22e3 /fs/btrfs/inode.c | |
| parent | rust: add seqfile abstraction (diff) | |
| download | kernel-fe95f58320e6c8dcea3bcb01336b9a7fdd7f684b.tar.gz kernel-fe95f58320e6c8dcea3bcb01336b9a7fdd7f684b.zip | |
rust: task: adjust safety comments in Task methods
The `Task` struct has several safety comments that aren't so great. For
example, the reason that it's okay to read the `pid` is that the field
is immutable, so there is no data race, which is not what the safety
comment says.
Thus, improve the safety comments. Also add an `as_ptr` helper. This
makes it easier to read the various accessors on Task, as `self.0` may
be confusing syntax for new Rust users.
Signed-off-by: Alice Ryhl <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'fs/btrfs/inode.c')
0 files changed, 0 insertions, 0 deletions
