44//!
55//! C header: [`include/linux/fs.h`](../../../../include/linux/fs.h)
66
7- use core:: convert:: { TryFrom , TryInto } ;
8- use core:: { marker, mem, ptr} ;
9-
10- use alloc:: boxed:: Box ;
11-
127use crate :: {
138 bindings, c_types,
149 error:: { from_kernel_result, Error , Result } ,
@@ -19,6 +14,8 @@ use crate::{
1914 types:: PointerWrapper ,
2015 user_ptr:: { UserSlicePtr , UserSlicePtrReader , UserSlicePtrWriter } ,
2116} ;
17+ use core:: convert:: { TryFrom , TryInto } ;
18+ use core:: { marker, mem, ptr} ;
2219
2320/// Wraps the kernel's `struct poll_table_struct`.
2421///
@@ -610,12 +607,12 @@ pub trait FileOpenAdapter<T: Sync> {
610607/// File descriptors may be used from multiple threads/processes concurrently, so your type must be
611608/// [`Sync`]. It must also be [`Send`] because [`FileOperations::release`] will be called from the
612609/// thread that decrements that associated file's refcount to zero.
613- pub trait FileOperations : Send + Sync + Sized + ' static {
610+ pub trait FileOperations {
614611 /// The methods to use to populate [`struct file_operations`].
615612 const TO_USE : ToUse ;
616613
617614 /// The pointer type that will be used to hold ourselves.
618- type Wrapper : PointerWrapper = Box < Self > ;
615+ type Wrapper : PointerWrapper + Send + Sync = ( ) ;
619616
620617 /// The type of the context data passed to [`FileOperations::open`].
621618 type OpenData : Sync = ( ) ;
0 commit comments