diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/drbd/drbd_req.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 810070146862..4fc7f98d9856 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c | |||
@@ -786,6 +786,7 @@ static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio, uns | |||
786 | int local, remote, send_oos = 0; | 786 | int local, remote, send_oos = 0; |
787 | int err = -EIO; | 787 | int err = -EIO; |
788 | int ret = 0; | 788 | int ret = 0; |
789 | union drbd_state s; | ||
789 | 790 | ||
790 | /* allocate outside of all locks; */ | 791 | /* allocate outside of all locks; */ |
791 | req = drbd_req_new(mdev, bio); | 792 | req = drbd_req_new(mdev, bio); |
@@ -847,8 +848,9 @@ static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio, uns | |||
847 | drbd_al_begin_io(mdev, sector); | 848 | drbd_al_begin_io(mdev, sector); |
848 | } | 849 | } |
849 | 850 | ||
850 | remote = remote && drbd_should_do_remote(mdev->state); | 851 | s = mdev->state; |
851 | send_oos = rw == WRITE && drbd_should_send_oos(mdev->state); | 852 | remote = remote && drbd_should_do_remote(s); |
853 | send_oos = rw == WRITE && drbd_should_send_oos(s); | ||
852 | D_ASSERT(!(remote && send_oos)); | 854 | D_ASSERT(!(remote && send_oos)); |
853 | 855 | ||
854 | if (!(local || remote) && !is_susp(mdev->state)) { | 856 | if (!(local || remote) && !is_susp(mdev->state)) { |