]> git.karo-electronics.de Git - karo-tx-linux.git/commit
target/file: Fix 32-bit highmem breakage for SGL -> iovec mapping
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 5 Dec 2012 11:08:29 +0000 (12:08 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 3 Jan 2013 03:33:29 +0000 (03:33 +0000)
commit1506cb20191c0b33ae0c6cedac7a0ebf4fee3cf7
treed52259fbd86dcab53b7fdef6e23ffd24a3f0db47
parent38b2177a93057a723b1c4640a293ed7c513fefbf
target/file: Fix 32-bit highmem breakage for SGL -> iovec mapping

commit 40ff2c3b3da35dd3a00ac6722056a59b4b3f2caf upstream.

This patch changes vectored file I/O to use kmap + kunmap when mapping
incoming SGL memory -> struct iovec in order to properly support 32-bit
highmem configurations.  This is because an extra bounce buffer may be
required when processing scatterlist pages allocated with GFP_KERNEL.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
[bwh: Backported to 3.2: use task->task_sg{,_nents} for iteration]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/target/target_core_file.c