* drbd_process_done_ee() by asender only */
static int e_end_resync_block(struct drbd_work *w, int unused)
{
- struct drbd_peer_request *peer_req = (struct drbd_peer_request *)w;
+ struct drbd_peer_request *peer_req =
+ container_of(w, struct drbd_peer_request, w);
struct drbd_conf *mdev = w->mdev;
sector_t sector = peer_req->i.sector;
int ok;
*/
static int e_end_block(struct drbd_work *w, int cancel)
{
- struct drbd_peer_request *peer_req = (struct drbd_peer_request *)w;
+ struct drbd_peer_request *peer_req =
+ container_of(w, struct drbd_peer_request, w);
struct drbd_conf *mdev = w->mdev;
sector_t sector = peer_req->i.sector;
int ok = 1, pcmd;
static int e_send_discard_ack(struct drbd_work *w, int unused)
{
- struct drbd_peer_request *peer_req = (struct drbd_peer_request *)w;
+ struct drbd_peer_request *peer_req =
+ container_of(w, struct drbd_peer_request, w);
struct drbd_conf *mdev = w->mdev;
int ok = 1;