diff options
author | NeilBrown <neilb@suse.de> | 2014-09-21 20:06:23 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2014-09-21 20:18:03 -0400 |
commit | f0cc9a057151892b885be21a1d19b0185568281d (patch) | |
tree | 121cf9034f9e5b081c36aa6135bbcee7d6614555 /drivers/md/raid1.c | |
parent | d030671f3f261e528dc6e396a13f10859a74ae7c (diff) |
md/raid1: intialise start_next_window for READ case to avoid hang
r1_bio->start_next_window is not initialised in the READ
case, so allow_barrier may incorrectly decrement
conf->current_window_requests
which can cause raise_barrier() to block forever.
Fixes: 79ef3a8aa1cb1523cc231c9a90a278333c21f761
cc: stable@vger.kernel.org (v3.13+)
Reported-by: Brassow Jonathan <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index d7690f86fdb9..9ebccf624571 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -1186,6 +1186,7 @@ read_again: | |||
1186 | atomic_read(&bitmap->behind_writes) == 0); | 1186 | atomic_read(&bitmap->behind_writes) == 0); |
1187 | } | 1187 | } |
1188 | r1_bio->read_disk = rdisk; | 1188 | r1_bio->read_disk = rdisk; |
1189 | r1_bio->start_next_window = 0; | ||
1189 | 1190 | ||
1190 | read_bio = bio_clone_mddev(bio, GFP_NOIO, mddev); | 1191 | read_bio = bio_clone_mddev(bio, GFP_NOIO, mddev); |
1191 | bio_trim(read_bio, r1_bio->sector - bio->bi_iter.bi_sector, | 1192 | bio_trim(read_bio, r1_bio->sector - bio->bi_iter.bi_sector, |