diff options
author | Philipp Reisner | 2011-02-09 18:09:48 +0100 |
---|---|---|
committer | Philipp Reisner | 2011-09-28 10:33:15 +0200 |
commit | 00d56944ff086f895e9ad184a7785ca1eece4a3b (patch) | |
tree | 81d441db6b28215a7050ef208d40aa5c1bb1b812 /drivers/block/drbd/drbd_state.c | |
parent | drbd: Moved some initializing code into drbd_new_tconn() (diff) | |
download | kernel-qcow2-linux-00d56944ff086f895e9ad184a7785ca1eece4a3b.tar.gz kernel-qcow2-linux-00d56944ff086f895e9ad184a7785ca1eece4a3b.tar.xz kernel-qcow2-linux-00d56944ff086f895e9ad184a7785ca1eece4a3b.zip |
drbd: Generalized the work callbacks
No longer work callbacks must operate on a mdev. From now on they
can also operate on a tconn.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_state.c')
-rw-r--r-- | drivers/block/drbd/drbd_state.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c index 36679841af68..30a3a1de07cb 100644 --- a/drivers/block/drbd/drbd_state.c +++ b/drivers/block/drbd/drbd_state.c @@ -40,7 +40,7 @@ struct after_state_chg_work { extern void _tl_restart(struct drbd_conf *mdev, enum drbd_req_event what); int drbd_send_state_req(struct drbd_conf *, union drbd_state, union drbd_state); -static int w_after_state_ch(struct drbd_conf *mdev, struct drbd_work *w, int unused); +static int w_after_state_ch(struct drbd_work *w, int unused); static void after_state_ch(struct drbd_conf *mdev, union drbd_state os, union drbd_state ns, enum chg_state_flags flags); static void after_conn_state_ch(struct drbd_tconn *tconn, union drbd_state os, @@ -853,10 +853,11 @@ __drbd_set_state(struct drbd_conf *mdev, union drbd_state ns, return rv; } -static int w_after_state_ch(struct drbd_conf *mdev, struct drbd_work *w, int unused) +static int w_after_state_ch(struct drbd_work *w, int unused) { struct after_state_chg_work *ascw = container_of(w, struct after_state_chg_work, w); + struct drbd_conf *mdev = w->mdev; after_state_ch(mdev, ascw->os, ascw->ns, ascw->flags); if (ascw->flags & CS_WAIT_COMPLETE) { |