btrfs: correctly handle return from ulist_add
authorMark Fasheh <mfasheh@suse.de>
Thu, 17 Jul 2014 19:39:04 +0000 (12:39 -0700)
committerChris Mason <clm@fb.com>
Fri, 15 Aug 2014 14:43:16 +0000 (07:43 -0700)
ulist_add() can return '1' on sucess, which qgroup_subtree_accounting()
doesn't take into account. As a result, that value can be bubbled up to
callers, causing an error to be printed. Fix this by only returning the
value of ulist_add() when it indicates an error.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/qgroup.c

Simple merge