Commit 4373519d authored by Jan Schmidt's avatar Jan Schmidt Committed by Josef Bacik

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: default avatarJan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
parent d52be818
...@@ -430,7 +430,7 @@ int btrfs_read_qgroup_config(struct btrfs_fs_info *fs_info) ...@@ -430,7 +430,7 @@ int btrfs_read_qgroup_config(struct btrfs_fs_info *fs_info)
} }
btrfs_free_path(path); btrfs_free_path(path);
if (ret) if (ret < 0)
ulist_free(fs_info->qgroup_ulist); ulist_free(fs_info->qgroup_ulist);
return ret < 0 ? ret : 0; return ret < 0 ? ret : 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment