btrfs: extent-tree: Detect bytes_pinned underflow earlier
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>
Wed, 24 Oct 2018 12:24:02 +0000 (20:24 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Dec 2018 13:51:26 +0000 (14:51 +0100)
commite2907c1a6ae1842f9c1d5393bbe966c1ccfbc335
tree3e71421186e5300a82000bf2b5abd486ef2fa9e2
parent9f9b8e8d0ebe1af42ddd3c86e12569c53914a89d
btrfs: extent-tree: Detect bytes_pinned underflow earlier

Introduce a new wrapper update_bytes_pinned to replace open coded
bytes_pinned modifiers. Now the underflows of space_info::bytes_pinned
get detected and reported.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c