aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/file.h2
-rw-r--r--include/linux/fs.h13
-rw-r--r--include/linux/sched/user.h2
-rw-r--r--include/linux/syscalls.h8
4 files changed, 23 insertions, 2 deletions
diff --git a/include/linux/file.h b/include/linux/file.h
index 6b2fb032416c..3fcddff56bc4 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -13,6 +13,7 @@
13struct file; 13struct file;
14 14
15extern void fput(struct file *); 15extern void fput(struct file *);
16extern void fput_many(struct file *, unsigned int);
16 17
17struct file_operations; 18struct file_operations;
18struct vfsmount; 19struct vfsmount;
@@ -44,6 +45,7 @@ static inline void fdput(struct fd fd)
44} 45}
45 46
46extern struct file *fget(unsigned int fd); 47extern struct file *fget(unsigned int fd);
48extern struct file *fget_many(unsigned int fd, unsigned int refs);
47extern struct file *fget_raw(unsigned int fd); 49extern struct file *fget_raw(unsigned int fd);
48extern unsigned long __fdget(unsigned int fd); 50extern unsigned long __fdget(unsigned int fd);
49extern unsigned long __fdget_raw(unsigned int fd); 51extern unsigned long __fdget_raw(unsigned int fd);
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);
3511extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len, 3513extern 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)
3517extern struct sock *io_uring_get_socket(struct file *file);
3518#else
3519static 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 */
diff --git a/include/linux/sched/user.h b/include/linux/sched/user.h
index 39ad98c09c58..c7b5f86b91a1 100644
--- a/include/linux/sched/user.h
+++ b/include/linux/sched/user.h
@@ -40,7 +40,7 @@ struct user_struct {
40 kuid_t uid; 40 kuid_t uid;
41 41
42#if defined(CONFIG_PERF_EVENTS) || defined(CONFIG_BPF_SYSCALL) || \ 42#if defined(CONFIG_PERF_EVENTS) || defined(CONFIG_BPF_SYSCALL) || \
43 defined(CONFIG_NET) 43 defined(CONFIG_NET) || defined(CONFIG_IO_URING)
44 atomic_long_t locked_vm; 44 atomic_long_t locked_vm;
45#endif 45#endif
46 46
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 94369f5bd8e5..c2962953bf11 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -69,6 +69,7 @@ struct file_handle;
69struct sigaltstack; 69struct sigaltstack;
70struct rseq; 70struct rseq;
71union bpf_attr; 71union bpf_attr;
72struct io_uring_params;
72 73
73#include <linux/types.h> 74#include <linux/types.h>
74#include <linux/aio_abi.h> 75#include <linux/aio_abi.h>
@@ -314,6 +315,13 @@ asmlinkage long sys_io_pgetevents_time32(aio_context_t ctx_id,
314 struct io_event __user *events, 315 struct io_event __user *events,
315 struct old_timespec32 __user *timeout, 316 struct old_timespec32 __user *timeout,
316 const struct __aio_sigset *sig); 317 const struct __aio_sigset *sig);
318asmlinkage long sys_io_uring_setup(u32 entries,
319 struct io_uring_params __user *p);
320asmlinkage long sys_io_uring_enter(unsigned int fd, u32 to_submit,
321 u32 min_complete, u32 flags,
322 const sigset_t __user *sig, size_t sigsz);
323asmlinkage long sys_io_uring_register(unsigned int fd, unsigned int op,
324 void __user *arg, unsigned int nr_args);
317 325
318/* fs/xattr.c */ 326/* fs/xattr.c */
319asmlinkage long sys_setxattr(const char __user *path, const char __user *name, 327asmlinkage long sys_setxattr(const char __user *path, const char __user *name,