Fix a problem that shows up if less than the full complement of
lock sectors are defined ("number_of_keys" argument to gbde init being less than 4 in the default compile).
This commit is contained in:
parent
cbca0b53e5
commit
4090065137
@ -311,7 +311,7 @@ g_bde_map_sector(struct g_bde_work *wp)
|
|||||||
/* Compensate for lock sectors */
|
/* Compensate for lock sectors */
|
||||||
for (u = 0; u < G_BDE_MAXKEYS; u++) {
|
for (u = 0; u < G_BDE_MAXKEYS; u++) {
|
||||||
/* Find the start of this lock sector */
|
/* Find the start of this lock sector */
|
||||||
ko = kp->lsector[u] & ~(kp->sectorsize - 1);
|
ko = kp->lsector[u] & ~((uint64_t)kp->sectorsize - 1);
|
||||||
|
|
||||||
if (wp->kso >= ko)
|
if (wp->kso >= ko)
|
||||||
wp->kso += kp->sectorsize;
|
wp->kso += kp->sectorsize;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user