]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
Btrfs: fix deadlock in run_delalloc_nocow
authorLiu Bo <bo.li.liu@oracle.com>
Thu, 25 Jan 2018 18:02:50 +0000 (11:02 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 23 Feb 2018 14:27:33 +0000 (08:27 -0600)
commit0c76559b994d00ebc7d72e419eb1c03697bab253
tree90031bdbede20ea2a5b4bb814ec71544133cfd08
parent91170206a28f1b374e06a91b0930f34eb1fb89ca
Btrfs: fix deadlock in run_delalloc_nocow

BugLink: http://bugs.launchpad.net/bugs/1751131
commit e89166990f11c3f21e1649d760dd35f9e410321c upstream.

@cur_offset is not set back to what it should be (@cow_start) if
btrfs_next_leaf() returns something wrong, and the range [cow_start,
cur_offset) remains locked forever.

cc: <stable@vger.kernel.org>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/btrfs/inode.c