btrfs: backref: Don't merge refs which are not for same block.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Wed, 1 Apr 2015 06:39:06 +0000 (14:39 +0800)
committerChris Mason <clm@fb.com>
Wed, 10 Jun 2015 16:24:59 +0000 (09:24 -0700)
commit00db646d3fb3f5f62c2327abcf3630f4cc1075ba
tree6dcc37bf71b946cd6322028f67bf315e83fbd4b7
parent20b2e3029eef277cd93a46a991004260057e1a9e
btrfs: backref: Don't merge refs which are not for same block.

Old __merge_refs() in backref.c will even merge refs whose root_id are
different, which makes qgroup gives wrong result.

Fix it by checking ref_for_same_block() before any mode specific works.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/backref.c