Btrfs: fix pages truncation in btrfs_ioctl_clone()
commit71ef07861080418d125dcf454af41baafa409a2c
authorLi Zefan <lizf@cn.fujitsu.com>
Sun, 18 Sep 2011 14:20:46 +0000 (18 10:20 -0400)
committerChris Mason <chris.mason@oracle.com>
Sun, 18 Sep 2011 14:20:46 +0000 (18 10:20 -0400)
tree9f2c706625a67a5164f774805eb8aaa32ea2410b
parent3765fefaee2da83f10829fa64a74e6b7360350cb
Btrfs: fix pages truncation in btrfs_ioctl_clone()

It's a bug in commit f81c9cdc567cd3160ff9e64868d9a1a7ee226480
(Btrfs: truncate pages from clone ioctl target range)

We should pass the dest range to the truncate function, but not the
src range.

Also move the function before locking extent state.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ioctl.c