2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00

Btrfs: fix memory patcher through fs_info->qgroup_ulist

Commit 5b7c665e introduced fs_info->qgroup_ulist, that is allocated during
btrfs_read_qgroup_config and meant to be used later by the qgroup accounting
code. However, it is always freed before btrfs_read_qgroup_config returns,
becuase the commit mentioned above adds a check for (ret), where a check
for (ret < 0) would have been the right choice. This commit fixes the check.

Cc: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
This commit is contained in:
Jan Schmidt 2013-05-28 15:47:22 +00:00 committed by Josef Bacik
parent d52be818e6
commit 4373519db4

View File

@ -430,7 +430,7 @@ out:
}
btrfs_free_path(path);
if (ret)
if (ret < 0)
ulist_free(fs_info->qgroup_ulist);
return ret < 0 ? ret : 0;