This was meant to be helpful, but it's actively harmful if we're not
running as root. Just get rid of it, it's really no different than
needing appropriate memlock limits for just the ring itself.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
ld->ring_fd = ret;
if (o->fixedbufs) {
- struct rlimit rlim = {
- .rlim_cur = RLIM_INFINITY,
- .rlim_max = RLIM_INFINITY,
- };
-
- if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0)
- return -1;
-
ret = syscall(__NR_io_uring_register, ld->ring_fd,
IORING_REGISTER_BUFFERS, ld->iovecs, depth);
if (ret < 0)