From: Chris Mason Date: Mon, 7 Mar 2011 16:10:24 +0000 (-0500) Subject: Btrfs: deal with short returns from copy_from_user X-Git-Tag: v2.6.38~13^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31339acd07b4ba687906702085127895a56eb920;p=pandora-kernel.git Btrfs: deal with short returns from copy_from_user When copy_from_user is only able to copy some of the bytes we requested, we may end up creating a partially up to date page. To avoid garbage in the page, we need to treat a partial copy as a zero length copy. This makes the rest of the file_write code drop the page and retry the whole copy instead of marking the partially up to date page as dirty. Signed-off-by: Chris Mason cc: stable@kernel.org --- Reading git-diff-tree failed