diff options
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index d88ba4a9eff..50f3bba68a2 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -3004,9 +3004,12 @@ static int ext4_da_writepages(struct address_space *mapping, | |||
3004 | * sbi->max_writeback_mb_bump whichever is smaller. | 3004 | * sbi->max_writeback_mb_bump whichever is smaller. |
3005 | */ | 3005 | */ |
3006 | max_pages = sbi->s_max_writeback_mb_bump << (20 - PAGE_CACHE_SHIFT); | 3006 | max_pages = sbi->s_max_writeback_mb_bump << (20 - PAGE_CACHE_SHIFT); |
3007 | if (!range_cyclic && range_whole) | 3007 | if (!range_cyclic && range_whole) { |
3008 | desired_nr_to_write = wbc->nr_to_write * 8; | 3008 | if (wbc->nr_to_write == LONG_MAX) |
3009 | else | 3009 | desired_nr_to_write = wbc->nr_to_write; |
3010 | else | ||
3011 | desired_nr_to_write = wbc->nr_to_write * 8; | ||
3012 | } else | ||
3010 | desired_nr_to_write = ext4_num_dirty_pages(inode, index, | 3013 | desired_nr_to_write = ext4_num_dirty_pages(inode, index, |
3011 | max_pages); | 3014 | max_pages); |
3012 | if (desired_nr_to_write > max_pages) | 3015 | if (desired_nr_to_write > max_pages) |