Skip to content

Commit e2eba00

Browse files
committed
Undo wrong change in commit 212e8dc
1 parent 6be579e commit e2eba00

File tree

1 file changed

+3
-8
lines changed
  • src/backend/storage/file

1 file changed

+3
-8
lines changed

src/backend/storage/file/fd.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2391,14 +2391,9 @@ FileSeek(File file, off_t offset, int whence)
23912391

23922392
for (i = RELSEG_SIZE; --i != 0;)
23932393
{
2394-
if (vfdP->snap_map->offs[i] != 0)
2395-
{
2396-
if (i*BLCKSZ >= vfdP->seekPos)
2397-
{
2398-
vfdP->seekPos = i*BLCKSZ;
2399-
}
2400-
break;
2401-
}
2394+
sfs_segment_offs_t offs = vfdP->snap_map->offs[i];
2395+
if (offs >= vfdP->seekPos)
2396+
vfdP->seekPos = offs + BLCKSZ - 1;
24022397
}
24032398
}
24042399
}

0 commit comments

Comments
 (0)