mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
buffer: have alloc_page_buffers() use __GFP_NOFAIL
Instead of adding weird retry logic in that function, utilize __GFP_NOFAIL to ensure that the vm takes care of handling any potential retries appropriately. This means we don't have to call free_more_memory() from here. Reviewed-by: Nikolay Borisov <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
7beb2f845b
commit
640ab98fb3
5 changed files with 14 additions and 27 deletions
|
|
@ -1739,7 +1739,7 @@ void mark_ntfs_record_dirty(struct page *page, const unsigned int ofs) {
|
|||
spin_lock(&mapping->private_lock);
|
||||
if (unlikely(!page_has_buffers(page))) {
|
||||
spin_unlock(&mapping->private_lock);
|
||||
bh = head = alloc_page_buffers(page, bh_size, 1);
|
||||
bh = head = alloc_page_buffers(page, bh_size, true);
|
||||
spin_lock(&mapping->private_lock);
|
||||
if (likely(!page_has_buffers(page))) {
|
||||
struct buffer_head *tail;
|
||||
|
|
|
|||
|
|
@ -507,7 +507,7 @@ int ntfs_sync_mft_mirror(ntfs_volume *vol, const unsigned long mft_no,
|
|||
if (unlikely(!page_has_buffers(page))) {
|
||||
struct buffer_head *tail;
|
||||
|
||||
bh = head = alloc_page_buffers(page, blocksize, 1);
|
||||
bh = head = alloc_page_buffers(page, blocksize, true);
|
||||
do {
|
||||
set_buffer_uptodate(bh);
|
||||
tail = bh;
|
||||
|
|
|
|||
Loading…
Reference in a new issue