Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70737
b: refs/heads/master
c: 369f238
h: refs/heads/master
i:
  70735: c33e559
v: v3
  • Loading branch information
Fengguang Wu authored and Linus Torvalds committed Oct 17, 2007
1 parent 25bc260 commit 03801be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c0eeaf5698597146ed9b873e2f9e0961edcf0f9
refs/heads/master: 369f2389e7d03022abdd25e298bffb9613cd0e54
18 changes: 8 additions & 10 deletions trunk/mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,16 +502,6 @@ void throttle_vm_writeout(gfp_t gfp_mask)
long background_thresh;
long dirty_thresh;

if ((gfp_mask & (__GFP_FS|__GFP_IO)) != (__GFP_FS|__GFP_IO)) {
/*
* The caller might hold locks which can prevent IO completion
* or progress in the filesystem. So we cannot just sit here
* waiting for IO to complete.
*/
congestion_wait(WRITE, HZ/10);
return;
}

for ( ; ; ) {
get_dirty_limits(&background_thresh, &dirty_thresh, NULL, NULL);

Expand All @@ -525,6 +515,14 @@ void throttle_vm_writeout(gfp_t gfp_mask)
global_page_state(NR_WRITEBACK) <= dirty_thresh)
break;
congestion_wait(WRITE, HZ/10);

/*
* The caller might hold locks which can prevent IO completion
* or progress in the filesystem. So we cannot just sit here
* waiting for IO to complete.
*/
if ((gfp_mask & (__GFP_FS|__GFP_IO)) != (__GFP_FS|__GFP_IO))
break;
}
}

Expand Down

0 comments on commit 03801be

Please sign in to comment.