We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7ba0f81 + 6cb92dc commit e63414cCopy full SHA for e63414c
rust/kernel/file_operations.rs
@@ -415,8 +415,9 @@ impl IoctlCommand {
415
/// You implement this trait whenever you would create a `struct file_operations`.
416
///
417
/// File descriptors may be used from multiple threads/processes concurrently, so your type must be
418
-/// [`Sync`].
419
-pub trait FileOperations: Sync + Sized {
+/// [`Sync`]. It must also be [`Send`] because [`FileOperations::release`] will be called from the
+/// thread that decrements that associated file's refcount to zero.
420
+pub trait FileOperations: Send + Sync + Sized {
421
/// The methods to use to populate [`struct file_operations`].
422
const TO_USE: ToUse;
423
0 commit comments