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)
commitf90e579c2b391979630b3343de0be65ab1b478ce
treef62a838f21e8b592796893e9998cc53310fea172
parent1152651a081720ef6a8c76bb7da676e8c900ac30
btrfs: correctly handle return from ulist_add

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