Make MemoryFS threadsafe.