]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: use ASSERT to report logical error in cow_file_range()
authorAnand Jain <anand.jain@oracle.com>
Thu, 15 Feb 2018 10:07:59 +0000 (18:07 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 13:09:35 +0000 (15:09 +0200)
commit706bd4508de72b6c0fd844622f4ca388de0372a4
tree6cee8bc71b76d1b0c6e43de1f78f28ebaa25cae7
parent16c7f7f82884bbc2f446884c9696e69525ee34f1
btrfs: use ASSERT to report logical error in cow_file_range()

Use ASSERT to report logical error in cow_file_range(), also move it a
bit closer to when the num_bytes is derived.

The extent start could be (u64)-1 in some cases, the assert should catch
that we do not accidentally pass it to cow_file_range.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c