Fix calculation of number of pages in a PRP List
The existing calculation underestimated the number of pages required as it did not take into account the pointer at the end of each page. The replacement calculation may overestimate the number of pages required if the last page in the PRP List is entirely full. By using ->npages as a counter as we fill in the pages, we ensure that we don't try to free a page that was never allocated. Signed-off-by: NNisheeth Bhat <nisheeth.bhat@intel.com> Signed-off-by: NMatthew Wilcox <matthew.r.wilcox@intel.com>
Showing
想要评论请 注册 或 登录