|
@@ -244,13 +244,8 @@ void task_dirty_inc(struct task_struct *tsk)
|
|
static void bdi_writeout_fraction(struct backing_dev_info *bdi,
|
|
static void bdi_writeout_fraction(struct backing_dev_info *bdi,
|
|
long *numerator, long *denominator)
|
|
long *numerator, long *denominator)
|
|
{
|
|
{
|
|
- if (bdi_cap_writeback_dirty(bdi)) {
|
|
|
|
- prop_fraction_percpu(&vm_completions, &bdi->completions,
|
|
|
|
|
|
+ prop_fraction_percpu(&vm_completions, &bdi->completions,
|
|
numerator, denominator);
|
|
numerator, denominator);
|
|
- } else {
|
|
|
|
- *numerator = 0;
|
|
|
|
- *denominator = 1;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static inline void task_dirties_fraction(struct task_struct *tsk,
|
|
static inline void task_dirties_fraction(struct task_struct *tsk,
|
|
@@ -495,6 +490,9 @@ static void balance_dirty_pages(struct address_space *mapping,
|
|
bool dirty_exceeded = false;
|
|
bool dirty_exceeded = false;
|
|
struct backing_dev_info *bdi = mapping->backing_dev_info;
|
|
struct backing_dev_info *bdi = mapping->backing_dev_info;
|
|
|
|
|
|
|
|
+ if (!bdi_cap_account_dirty(bdi))
|
|
|
|
+ return;
|
|
|
|
+
|
|
for (;;) {
|
|
for (;;) {
|
|
struct writeback_control wbc = {
|
|
struct writeback_control wbc = {
|
|
.sync_mode = WB_SYNC_NONE,
|
|
.sync_mode = WB_SYNC_NONE,
|