]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/btrfs/scrub.c
Btrfs: fix several potential problems in copy_nocow_pages_for_inode
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 27 Jun 2013 10:51:00 +0000 (18:51 +0800)
committerJosef Bacik <jbacik@fusionio.com>
Tue, 2 Jul 2013 15:50:58 +0000 (11:50 -0400)
commitedd1400be9f983f521c7397740d810fa210ee52f
tree519d72227701fbb03c368aca6bf75a850841483c
parent826aa0a82c5b9d2c8016c02b552e8f82f5b1e660
Btrfs: fix several potential problems in copy_nocow_pages_for_inode

- It makes no sense that we deal with a inode in the dead tree.
- fix the race between dio and page copy by waiting the dio completion
- avoid the page copy vs truncate/punch hole
- check if the page is in the page cache or not

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/scrub.c