From: Jens Axboe Date: Mon, 1 May 2006 17:50:48 +0000 (+0200) Subject: [PATCH] splice: fix bugs in pipe_to_file() X-Git-Tag: v2.6.17-rc4~63^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0568b409c74f7a125d92a09a3f386785700ef688;p=pandora-kernel.git [PATCH] splice: fix bugs in pipe_to_file() Found by Oleg Nesterov , fixed by me. - Only allow full pages to go to the page cache. - Check page != buf->page instead of using PIPE_BUF_FLAG_STOLEN. - Remember to clear 'stolen' if add_to_page_cache() fails. And as a cleanup on that: - Make the bottom fall-through logic a little less convoluted. Also make the steal path hold an extra reference to the page, so we don't have to differentiate between stolen and non-stolen at the end. Signed-off-by: Jens Axboe --- Reading git-diff-tree failed