Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/fs.h
| Show First 20 Lines • Show All 258 Lines • ▼ Show 20 Lines | |||||
| static inline struct linux_file * | static inline struct linux_file * | ||||
| get_file(struct linux_file *f) | get_file(struct linux_file *f) | ||||
| { | { | ||||
| refcount_acquire(f->_file == NULL ? &f->f_count : &f->_file->f_count); | refcount_acquire(f->_file == NULL ? &f->f_count : &f->_file->f_count); | ||||
| return (f); | return (f); | ||||
| } | } | ||||
| struct linux_file * linux67_get_file_rcu(struct linux_file **f); | struct linux_file * linux_get_file_rcu(struct linux_file **f); | ||||
| struct linux_file * get_file_active(struct linux_file **f); | struct linux_file * get_file_active(struct linux_file **f); | ||||
| #if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60700 | #if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION < 60700 | ||||
| #define get_file_rcu(f) linux67_get_file_rcu(f) | |||||
| #else | |||||
| static inline bool | static inline bool | ||||
| get_file_rcu(struct linux_file *f) | get_file_rcu(struct linux_file *f) | ||||
| { | { | ||||
| return (refcount_acquire_if_not_zero( | return (refcount_acquire_if_not_zero( | ||||
| f->_file == NULL ? &f->f_count : &f->_file->f_count)); | f->_file == NULL ? &f->f_count : &f->_file->f_count)); | ||||
| } | } | ||||
| #else | |||||
| #define get_file_rcu(f) linux_get_file_rcu(f) | |||||
| #endif | #endif | ||||
| static inline struct inode * | static inline struct inode * | ||||
| igrab(struct inode *inode) | igrab(struct inode *inode) | ||||
| { | { | ||||
| int error; | int error; | ||||
| error = vget(inode, 0); | error = vget(inode, 0); | ||||
| ▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines | |||||