]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: fix the returned block count if EXT4_IOC_MOVE_EXT fails
authorAkira Fujita <a-fujita@rs.jp.nec.com>
Mon, 23 Nov 2009 12:25:48 +0000 (07:25 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Dec 2009 16:07:24 +0000 (08:07 -0800)
commit9a88a5ad2afe14b6f077c805a9c6dd95679aabba
tree8dc48c44cda7eaef7c5abd34722204db904b58a9
parenta7aaaff940e284035a16e07cf90424da386ddce1
ext4: fix the returned block count if EXT4_IOC_MOVE_EXT fails

(cherry picked from commit f868a48d06f8886cb0367568a12367fa4f21ea0d)

If the EXT4_IOC_MOVE_EXT ioctl fails, the number of blocks that were
exchanged before the failure should be returned to the userspace
caller.  Unfortunately, currently if the block size is not the same as
the page size, the returned block count that is returned is the
page-aligned block count instead of the actual block count.  This
commit addresses this bug.

Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/move_extent.c