From: Miklos Szeredi Date: Fri, 4 Jul 2008 07:35:17 +0000 (+0200) Subject: splice: fix generic_file_splice_read() race with page invalidation X-Git-Tag: v2.6.27-rc1~1114^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32502b8413a77b54b9e19809404109590c32dfb7;p=pandora-kernel.git splice: fix generic_file_splice_read() race with page invalidation If a page was invalidated during splicing from file to a pipe, then generic_file_splice_read() could return a short or zero count. This manifested itself in rare I/O errors seen on nfs exported fuse filesystems. This is because nfsd uses splice_direct_to_actor() to read files, and fuse uses invalidate_inode_pages2() to invalidate stale data on open. Fix by redoing the page find/create if it was found to be truncated (invalidated). Signed-off-by: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe --- Reading git-diff-tree failed