Fix an error to calculate no data page bytes (#2122)

Co-authored-by: Takeshi Nakatani <ggtakec@gmail.com>
This commit is contained in:
Leon 2023-03-11 16:23:56 +08:00 committed by GitHub
parent 9d00b8d4a8
commit 4f22354aae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -774,7 +774,7 @@ bool PageList::GetNoDataPageLists(fdpage_list_t& nodata_pages, off_t start, size
fdpage tmppage;
tmppage.offset = std::max(iter->offset, start);
tmppage.bytes = (-1 != stop_pos ? iter->bytes : std::min(iter->bytes, (stop_pos - tmppage.offset)));
tmppage.bytes = (-1 == stop_pos ? iter->bytes : std::min(iter->bytes, (stop_pos - tmppage.offset)));
tmppage.loaded = iter->loaded;
tmppage.modified = iter->modified;