From: Josef Bacik Date: Mon, 22 Nov 2010 18:50:32 +0000 (+0000) Subject: Btrfs: fix typo in fallocate to make it honor actual size X-Git-Tag: v2.6.37-rc4~6^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55a61d1d06a3dc443d0db8aaa613365dcb83b98a;p=pandora-kernel.git Btrfs: fix typo in fallocate to make it honor actual size There is a typo in __btrfs_prealloc_file_range() where we set the i_size to actual_len/cur_offset, and then just set it to cur_offset again, and do the same with btrfs_ordered_update_i_size(). This fixes it back to keeping i_size in a local variable and then updating i_size properly. Tested this with xfs_io -F -f -c "falloc 0 1" -c "pwrite 0 1" foo stat'ing foo gives us a size of 1 instead of 4096 like it was. Thanks, Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed