ext4: use __GFP_NOFAIL in ext4_free_blocks()
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Sun, 13 Mar 2016 21:29:06 +0000 (17:29 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2016 08:07:34 +0000 (10:07 +0200)
commitd8aafd0cd155f070d814b65d16bfc389519c0ac9
tree194a68e2ec3fcc654ca7fb20be5766a005f4887a
parent1d074db69c46d62ce82b331c2080e2fcb710bf4a
ext4: use __GFP_NOFAIL in ext4_free_blocks()

commit adb7ef600cc9d9d15ecc934cc26af5c1379777df upstream.

This might be unexpected but pages allocated for sbi->s_buddy_cache are
charged to current memory cgroup. So, GFP_NOFS allocation could fail if
current task has been killed by OOM or if current memory cgroup has no
free memory left. Block allocator cannot handle such failures here yet.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/mballoc.c