diff --git a/src/linux_aligned_file_reader.cpp b/src/linux_aligned_file_reader.cpp index 31bf5f827..067e3647a 100644 --- a/src/linux_aligned_file_reader.cpp +++ b/src/linux_aligned_file_reader.cpp @@ -146,7 +146,6 @@ void LinuxAlignedFileReader::register_thread() int ret = io_setup(MAX_EVENTS, &ctx); if (ret != 0) { - lk.unlock(); if (ret == -EAGAIN) { std::cerr << "io_setup() failed with EAGAIN: Consider increasing /proc/sys/fs/aio-max-nr" << std::endl; @@ -161,7 +160,6 @@ void LinuxAlignedFileReader::register_thread() diskann::cout << "allocating ctx: " << ctx << " to thread-id:" << my_id << std::endl; ctx_map[my_id] = ctx; } - lk.unlock(); } void LinuxAlignedFileReader::deregister_thread()