diff --git a/fs/io_uring.c b/fs/io_uring.c index 9e7b7037f351eebf7014694dbb5748e823785e2f..e19d1778c6cf8aba784c2e650e88f33e1da92008 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -6215,13 +6215,6 @@ static int __io_sqe_files_scm(struct io_ring_ctx *ctx, int nr, int offset) struct sk_buff *skb; int i, nr_files; - if (!capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN)) { - unsigned long inflight = ctx->user->unix_inflight + nr; - - if (inflight > task_rlimit(current, RLIMIT_NOFILE)) - return -EMFILE; - } - fpl = kzalloc(sizeof(*fpl), GFP_KERNEL); if (!fpl) return -ENOMEM;