aboutsummaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorPekka Ristola <[email protected]>2025-05-27 20:48:55 +0000
committerChristian Brauner <[email protected]>2025-05-30 05:12:05 +0000
commit15ecd83dc06277385ad71dc7ea26911d9a79acaf (patch)
tree650070c17216b329e04f93c56d2872af0a5c67a1 /mm/filemap.c
parentiomap: don't lose folio dropbehind state for overwrites (diff)
downloadkernel-15ecd83dc06277385ad71dc7ea26911d9a79acaf.tar.gz
kernel-15ecd83dc06277385ad71dc7ea26911d9a79acaf.zip
rust: file: mark `LocalFile` as `repr(transparent)`
Unsafe code in `LocalFile`'s methods assumes that the type has the same layout as the inner `bindings::file`. This is not guaranteed by the default struct representation in Rust, but requires specifying the `transparent` representation. The `File` struct (which also wraps `bindings::file`) is already marked as `repr(transparent)`, so this change makes their layouts equivalent. Fixes: 851849824bb5 ("rust: file: add Rust abstraction for `struct file`") Closes: https://github.com/Rust-for-Linux/linux/issues/1165 Signed-off-by: Pekka Ristola <[email protected]> Link: https://lore.kernel.org/[email protected] Reviewed-by: Benno Lossin <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'mm/filemap.c')
0 files changed, 0 insertions, 0 deletions