diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-28 15:40:12 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 16:45:03 +0100 |
commit | 78bae59b1b7bc06c84e292e9ecf42c013723e057 (patch) | |
tree | 1deebbe72eab1b40c6b61f41c369c38e29fa816f /drivers/block/drbd/drbd_state.h | |
parent | e15766e9c94f7fa3396eff4ffbbf30dea8c0e22a (diff) | |
download | linux-78bae59b1b7bc06c84e292e9ecf42c013723e057.tar.bz2 |
drbd: Introduced drbd_read_state()
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.h')
-rw-r--r-- | drivers/block/drbd/drbd_state.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_state.h b/drivers/block/drbd/drbd_state.h index c0331f18371a..fdcfab9c1d84 100644 --- a/drivers/block/drbd/drbd_state.h +++ b/drivers/block/drbd/drbd_state.h @@ -48,12 +48,12 @@ struct drbd_tconn; val.T2 = (S2); val.T3 = (S3); val; }) #define _NS(D, T, S) \ - D, ({ union drbd_state __ns; __ns.i = D->state.i; __ns.T = (S); __ns; }) + D, ({ union drbd_state __ns; __ns = drbd_read_state(D); __ns.T = (S); __ns; }) #define _NS2(D, T1, S1, T2, S2) \ - D, ({ union drbd_state __ns; __ns.i = D->state.i; __ns.T1 = (S1); \ + D, ({ union drbd_state __ns; __ns = drbd_read_state(D); __ns.T1 = (S1); \ __ns.T2 = (S2); __ns; }) #define _NS3(D, T1, S1, T2, S2, T3, S3) \ - D, ({ union drbd_state __ns; __ns.i = D->state.i; __ns.T1 = (S1); \ + D, ({ union drbd_state __ns; __ns = drbd_read_state(D); __ns.T1 = (S1); \ __ns.T2 = (S2); __ns.T3 = (S3); __ns; }) enum chg_state_flags { |