]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix CLONE ioctl destination file size expansion to block boundary
authorSage Weil <sage@newdream.net>
Sat, 12 Jun 2010 22:31:14 +0000 (22:31 +0000)
committerChris Mason <chris.mason@oracle.com>
Mon, 19 Jul 2010 20:15:06 +0000 (16:15 -0400)
commit8d2a9b129c5a391c02ec4db785bfa87c20c4d75b
treecf41ab7d6a2c2606abe465c8229f002675696de0
parent0bece402f2a77fd28d0aa68241945f1a1cc929c0
Btrfs: fix CLONE ioctl destination file size expansion to block boundary

The CLONE and CLONE_RANGE ioctls round up the range of extents being
cloned to the block size when the range to clone extends to the end of file
(this is always the case with CLONE).  It was then using that offset when
extending the destination file's i_size.  Fix this by not setting i_size
beyond the originally requested ending offset.

This bug was introduced by d18001f4 (2.6.35-rc1).

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ioctl.c