ext4: replace open coded nofail allocation in ext4_free_blocks()
authorMichal Hocko <mhocko@suse.cz>
Sun, 5 Jul 2015 16:33:44 +0000 (12:33 -0400)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:09:13 +0000 (13:09 +0000)
commit35885097e077a2dbe3c9b4ced1b5dec1f6a5c16c
tree116e0fb02580b91b8bbc91014708bfdc06090f15
parent69daebdc119b4ccfa2b22ec560f86e04f4e86ff9
ext4: replace open coded nofail allocation in ext4_free_blocks()

commit 7444a072c387a93ebee7066e8aee776954ab0e41 upstream.

ext4_free_blocks is looping around the allocation request and mimics
__GFP_NOFAIL behavior without any allocation fallback strategy. Let's
remove the open coded loop and replace it with __GFP_NOFAIL. Without the
flag the allocator has no way to find out never-fail requirement and
cannot help in any way.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/mballoc.c