Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204180
b: refs/heads/master
c: 9ab98f5
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Jul 27, 2010
1 parent 306a210 commit f03adf1
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: 4289a08680d646dcc18e291cb437a292738e504f
refs/heads/master: 9ab98f57b3e1d73cd0720d29c21b687ba609cde9
6 changes: 4 additions & 2 deletions trunk/drivers/scsi/scsi_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,8 @@ static void map_region(sector_t lba, unsigned int len)
block = lba + alignment;
rem = do_div(block, granularity);

set_bit(block, map_storep);
if (block < map_size)
set_bit(block, map_storep);

lba += granularity - rem;
}
Expand All @@ -2011,7 +2012,8 @@ static void unmap_region(sector_t lba, unsigned int len)
block = lba + alignment;
rem = do_div(block, granularity);

if (rem == 0 && lba + granularity <= end)
if (rem == 0 && lba + granularity <= end &&
block < map_size)
clear_bit(block, map_storep);

lba += granularity - rem;
Expand Down

0 comments on commit f03adf1

Please sign in to comment.