diff options
author | Jan Schmidt <list.btrfs@jan-o-sch.net> | 2013-05-28 17:47:22 +0200 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-06-14 17:30:07 +0200 |
commit | 4373519db4dbca05341a60b28f6e159b106e4c4b (patch) | |
tree | 5d757bd4362c38cab798b6f4509802ad2a076b27 /fs/btrfs/qgroup.c | |
parent | Btrfs: simplify unlink reservations (diff) | |
download | linux-4373519db4dbca05341a60b28f6e159b106e4c4b.tar.xz linux-4373519db4dbca05341a60b28f6e159b106e4c4b.zip |
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>
Diffstat (limited to 'fs/btrfs/qgroup.c')
-rw-r--r-- | fs/btrfs/qgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index d059d86c3131..74b432d0b703 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -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; |