diff options
author | Josef Bacik <josef@toxicpanda.com> | 2018-07-19 10:49:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-05 09:26:33 +0200 |
commit | e7457f97d2af26bfdda028b691bc11363296b3a9 (patch) | |
tree | 0e9d94650e24d509a2f5d995f35694f95fd11a4a /fs/btrfs/extent_io.c | |
parent | 770025cc4b6918f6ef2591146920d693a13be168 (diff) | |
download | linux-stable-e7457f97d2af26bfdda028b691bc11363296b3a9.tar.gz linux-stable-e7457f97d2af26bfdda028b691bc11363296b3a9.tar.bz2 linux-stable-e7457f97d2af26bfdda028b691bc11363296b3a9.zip |
btrfs: don't leak ret from do_chunk_alloc
commit 4559b0a71749c442d34f7cfb9e72c9e58db83948 upstream.
If we're trying to make a data reservation and we have to allocate a
data chunk we could leak ret == 1, as do_chunk_alloc() will return 1 if
it allocated a chunk. Since the end of the function is the success path
just return 0.
CC: stable@vger.kernel.org # 4.4+
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/btrfs/extent_io.c')
0 files changed, 0 insertions, 0 deletions