Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24420
b: refs/heads/master
c: f634475
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Mar 27, 2006
1 parent a411478 commit c4f3647
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b3b46be38aef5c46a4e144f1bcb8d0cc6bf3ff97
refs/heads/master: f6344757a92e5466bf8c23a74ee8f972ff35cb05
6 changes: 4 additions & 2 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -1743,6 +1743,7 @@ static int make_request(request_queue_t *q, struct bio * bi)
sector_t logical_sector, last_sector;
struct stripe_head *sh;
const int rw = bio_data_dir(bi);
int remaining;

if (unlikely(bio_barrier(bi))) {
bio_endio(bi, bi->bi_size, -EOPNOTSUPP);
Expand Down Expand Up @@ -1852,15 +1853,16 @@ static int make_request(request_queue_t *q, struct bio * bi)

}
spin_lock_irq(&conf->device_lock);
if (--bi->bi_phys_segments == 0) {
remaining = --bi->bi_phys_segments;
spin_unlock_irq(&conf->device_lock);
if (remaining == 0) {
int bytes = bi->bi_size;

if ( bio_data_dir(bi) == WRITE )
md_write_end(mddev);
bi->bi_size = 0;
bi->bi_end_io(bi, bytes, 0);
}
spin_unlock_irq(&conf->device_lock);
return 0;
}

Expand Down

0 comments on commit c4f3647

Please sign in to comment.