fs: buffer: move allocation failure loop into the allocator