Skip to content

Commit

Permalink
DOSE-1104 [Backport of DOSE-1103 to 6.0.13.0] zfs_object_store_receiv…
Browse files Browse the repository at this point in the history
…e/zfs_object_store_send error values must be negative (openzfs#274)
  • Loading branch information
grwilson committed Mar 3, 2022
1 parent bd725bb commit 3f3abc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/os/linux/zfs/vdev_object_store.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ zfs_object_store_receive(vdev_object_store_t *vos, kvec_t *iov,
zfs_dbgmsg("(%px) zfs_object_store_receive socket closed",
curthread);
rw_exit(&vos->vos_sock_rwlock);
return (SET_ERROR(ENOTCONN));
return (SET_ERROR(-ENOTCONN));
}

size_t recvd = ksock_receive(vos->vos_sock, &msg, iov, iovcnt,
Expand All @@ -335,7 +335,7 @@ zfs_object_store_send(vdev_object_store_t *vos, kvec_t *iov, int iovcnt,
zfs_dbgmsg("(%px) zfs_object_store_send socket closed",
curthread);
rw_exit(&vos->vos_sock_rwlock);
return (SET_ERROR(ENOTCONN));
return (SET_ERROR(-ENOTCONN));
}
ssize_t sent = ksock_send(vos->vos_sock, &msg, iov, iovcnt, size);
rw_exit(&vos->vos_sock_rwlock);
Expand Down

0 comments on commit 3f3abc0

Please sign in to comment.