Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ad263d1

Browse files
author
Sokolov Yura
committed
cfs: ... simplify a bit
1 parent 8eba6d2 commit ad263d1

File tree

1 file changed

+6
-9
lines changed
  • src/backend/storage/file

1 file changed

+6
-9
lines changed

src/backend/storage/file/cfs.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,16 +1050,13 @@ static bool cfs_gc_file(char* map_path, GC_CALL_KIND background)
10501050
second_pass++;
10511051
}
10521052

1053-
if (n_pages1 > n_pages)
1053+
/* if file were truncated (vacuum???), clean a bit */
1054+
for (i = n_pages; i < n_pages1; i++)
10541055
{
1055-
/* if file were truncated (vacuum???), clean a bit */
1056-
for (i = n_pages; i < n_pages1; i++)
1057-
{
1058-
inode_t nnode = newMap->inodes[i];
1059-
if (CFS_INODE_SIZE(nnode) != 0) {
1060-
newUsed -= CFS_INODE_SIZE(nnode);
1061-
newMap->inodes[i] = CFS_INODE(0, 0);
1062-
}
1056+
inode_t nnode = newMap->inodes[i];
1057+
if (CFS_INODE_SIZE(nnode) != 0) {
1058+
newUsed -= CFS_INODE_SIZE(nnode);
1059+
newMap->inodes[i] = CFS_INODE(0, 0);
10631060
}
10641061
}
10651062

0 commit comments

Comments
 (0)