vhost_user_backend: remove ownership check in set_features()
set_features() fails with InvalidOperation if !self.owned. I don't see
this as a requirement in the specification and, in fact, vm-virtio
implementation for resetting the device calls SET_FEATURES just after
RESET_OWNER.
@@ -477,9 +477,7 @@ impl<S: VhostUserBackend> VhostUserSlaveReqHandler for VhostUserHandler<S> {
}
fn set_features(&mut self, features: u64) -> VhostUserResult<()> {
- if !self.owned {
- return Err(VhostUserError::InvalidOperation);
- } else if (features & !self.backend.read().unwrap().features()) != 0 {
+ if (features & !self.backend.read().unwrap().features()) != 0 {
return Err(VhostUserError::InvalidParam);
}
