]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: ohci: avoid reallocation of AR buffers
authorClemens Ladisch <clemens@ladisch.de>
Mon, 25 Oct 2010 09:42:42 +0000 (11:42 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 30 Oct 2010 21:37:20 +0000 (23:37 +0200)
commitda6e38ab7cc46747645826a27e8c46fed0fae198
treea9b2ba0d4382a1c0ad75182662570f61b5e03e57
parentd7f89f9ead9edd59daad9875f84a44c4d5fb7a3f
firewire: ohci: avoid reallocation of AR buffers

Freeing an AR buffer page just to allocate a new page immediately
afterwards is not only a pointless effort but also dangerous because
the allocation can fail, which would result in an oops later.

Split ar_context_add_page() into two functions so that we can reuse
the old page directly.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/ohci.c