target/rd: reduce code duplication in rd_execute_rw()