diff options
author | Nisheeth Bhat <nisheeth.bhat@intel.com> | 2011-09-29 10:10:10 -0400 |
---|---|---|
committer | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2011-11-04 15:53:04 -0400 |
commit | 0d1bc9125890426b52ca2de6abedd32e31722e5c (patch) | |
tree | c62cff35187c87c8a2b1f6dafdfc577cba94c137 /drivers/block/ps3disk.c | |
parent | bc5fc7e4b22ca855902aba02b28c96f09b446407 (diff) | |
download | op-kernel-dev-0d1bc9125890426b52ca2de6abedd32e31722e5c.zip op-kernel-dev-0d1bc9125890426b52ca2de6abedd32e31722e5c.tar.gz |
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: Nisheeth Bhat <nisheeth.bhat@intel.com>
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'drivers/block/ps3disk.c')
0 files changed, 0 insertions, 0 deletions