diff options
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 01e3cffd03b8..e2466425d9ca 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -1237,8 +1237,9 @@ static void end_sync_write(struct bio *bio, int error) | |||
1237 | update_head_pos(mirror, r1_bio); | 1237 | update_head_pos(mirror, r1_bio); |
1238 | 1238 | ||
1239 | if (atomic_dec_and_test(&r1_bio->remaining)) { | 1239 | if (atomic_dec_and_test(&r1_bio->remaining)) { |
1240 | md_done_sync(mddev, r1_bio->sectors, uptodate); | 1240 | sector_t s = r1_bio->sectors; |
1241 | put_buf(r1_bio); | 1241 | put_buf(r1_bio); |
1242 | md_done_sync(mddev, s, uptodate); | ||
1242 | } | 1243 | } |
1243 | } | 1244 | } |
1244 | 1245 | ||