]> git.baikalelectronics.ru Git - kernel.git/commit
NVMe: Simplify nvme_unmap_user_pages
authorMatthew Wilcox <matthew.r.wilcox@intel.com>
Fri, 6 Jan 2012 20:52:56 +0000 (13:52 -0700)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Tue, 10 Jan 2012 19:54:22 +0000 (14:54 -0500)
commit614b33167e1a84a44e3f031a5b30e9c98cf31eaf
tree3b378e4edca145b682cd4952c105ff9e31b3d465
parent721661a314d5019a709b1be9ee7b0d32e132e6ab
NVMe: Simplify nvme_unmap_user_pages

By using the iod->nents field (the same way other I/O paths do), we can
avoid recalculating the number of sg entries at unmap time, and make
nvme_unmap_user_pages() easier to call.

Also, use the 'write' parameter instead of assuming DMA_FROM_DEVICE.

Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
drivers/block/nvme.c