summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorVarun Wadekar <vwadekar@nvidia.com>2012-08-23 15:07:36 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-08-23 15:07:36 +0530
commitce078e4f80e0d82730d42be0ee44b9e6e1dd3866 (patch)
tree1c979b4d93de957a2cb7bb1e4a8068b62b02b663 /drivers/md
parent929b4be511e72a31d4ca9447a12dcc672d544f25 (diff)
parent196ad09b956e63131e3d196e490a4dfbb85e875f (diff)
Merge commit 'v3.4.9' into android-t114-3.4
Linux v3.4.9 Conflicts: arch/arm/kernel/smp.c arch/arm/vfp/entry.S Change-Id: I731e815ed35ba9280374a5a3e5a6a8b6b805d695 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index d7add9d5bac2..23904d233735 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2429,7 +2429,10 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int *skipp
/* There is nowhere to write, so all non-sync
* drives must be failed - so we are finished
*/
- sector_t rv = max_sector - sector_nr;
+ sector_t rv;
+ if (min_bad > 0)
+ max_sector = sector_nr + min_bad;
+ rv = max_sector - sector_nr;
*skipped = 1;
put_buf(r1_bio);
return rv;