From: Alex Elder Date: Wed, 7 Mar 2012 17:40:08 +0000 (-0600) Subject: libceph: isolate kmap() call in write_partial_msg_pages() X-Git-Tag: v3.4-rc1~76^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d63e318c4eb1bea6f7e3cb4b77849eaa167bfec;p=pandora-kernel.git libceph: isolate kmap() call in write_partial_msg_pages() In write_partial_msg_pages(), every case now does an identical call to kmap(page). Instead, just call it once inside the CRC-computing block where it's needed. Move the definition of kaddr inside that block, and make it a (char *) to ensure portable pointer arithmetic. We still don't kunmap() it until after the sendpage() call, in case that also ends up needing to use the mapping. Signed-off-by: Alex Elder Reviewed-by: Sage Weil --- Reading git-diff-tree failed