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)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Feb 2017 10:03:23 +0000 (11:03 +0100)
commitfa8a01a81af29ae9b490e29791badfb6d090eb71
treef437913de9d604ad870a240bcce73c19a2340c1f
parent3a45bbb2f9eb5ff7ab7dce23443a9355a74c9c74
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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
fs/ext4/mballoc.c