Fix deadlock in qremove.

Also, clean up error return from the conditional read.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>