compress: do not poll if enough space to write remaining data
Changes the poll logic in compress_write() to prevent
it polling if there is enough available space to write
all remaining data. Previously the logic always polled for
an entire fragment to become available before starting the
first write.
This change allows short writes of < frag_size, which is likely
at the end of a stream.
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>