diff options
Diffstat (limited to 'include/linux/fs.h')
| -rw-r--r-- | include/linux/fs.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 7442329a0011..0a257d89208e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -961,7 +961,9 @@ static inline struct file *get_file(struct file *f) | |||
| 961 | atomic_long_inc(&f->f_count); | 961 | atomic_long_inc(&f->f_count); |
| 962 | return f; | 962 | return f; |
| 963 | } | 963 | } |
| 964 | #define get_file_rcu(x) atomic_long_inc_not_zero(&(x)->f_count) | 964 | #define get_file_rcu_many(x, cnt) \ |
| 965 | atomic_long_add_unless(&(x)->f_count, (cnt), 0) | ||
| 966 | #define get_file_rcu(x) get_file_rcu_many((x), 1) | ||
| 965 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) | 967 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) |
| 966 | #define file_count(x) atomic_long_read(&(x)->f_count) | 968 | #define file_count(x) atomic_long_read(&(x)->f_count) |
| 967 | 969 | ||
| @@ -3511,4 +3513,13 @@ extern void inode_nohighmem(struct inode *inode); | |||
| 3511 | extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len, | 3513 | extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len, |
| 3512 | int advice); | 3514 | int advice); |
| 3513 | 3515 | ||
| 3516 | #if defined(CONFIG_IO_URING) | ||
| 3517 | extern struct sock *io_uring_get_socket(struct file *file); | ||
| 3518 | #else | ||
| 3519 | static inline struct sock *io_uring_get_socket(struct file *file) | ||
| 3520 | { | ||
| 3521 | return NULL; | ||
| 3522 | } | ||
| 3523 | #endif | ||
| 3524 | |||
| 3514 | #endif /* _LINUX_FS_H */ | 3525 | #endif /* _LINUX_FS_H */ |
