btrfs-progs: qgroup: cleanup the redundant function add_qgroup
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>
Tue, 31 Oct 2017 09:13:43 +0000 (17:13 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 14 Nov 2017 14:59:01 +0000 (15:59 +0100)
commit009fc32de7be97f931369fd9e5475969dc51d53f
tree2f686dab5dd010117524d838c2b1660a715be77f
parentfebfb10263a31558ad5bbffd8bf11c51b4395812
btrfs-progs: qgroup: cleanup the redundant function add_qgroup

There are reusable parts between update_qgroup and add_qgroup. So
introduce the function get_or_add_qgroup and use update_qgroup instead
of add_qgroup.
No functional changes.

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
qgroup.c