From: Alan Stern Date: Wed, 17 Jan 2007 07:28:48 +0000 (-0800) Subject: USB: gadgetfs AIO tweaks X-Git-Tag: v2.6.21-rc2~42^2~9^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49631ca7f3e2fd05186028b453fa27f75b830de7;p=pandora-kernel.git USB: gadgetfs AIO tweaks This patch (as837) fixes several mistakes in the AIO interface of the gadgetfs driver: The ki_retry method is not supposed to do a put on the kiocb. The extra call to aio_put_req() causes memory corruption. (Note: This call was removed before, by patch as691, and then mysteriously re-introduced later.) Even if a read transfer is cancelled, we can and should send to the user all the data that did manage to get transferred. Testing for AIO cancellation in the I/O completion handler is both racy and (now) unnecessary. aio_complete() does its own checking, in a safe manner. Signed-off-by: Alan Stern Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed