NTFS: In attrib.c::ntfs_attr_set() call balance_dirty_pages_ratelimited()

and cond_resched() in the main loop as we could be dirtying a lot of
      pages and this ensures we play nice with the VM and the system as a
      whole.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
This commit is contained in:
Anton Altaparmakov
2005-10-11 14:54:42 +01:00
parent 29d8699ebb
commit 29b8990513
3 changed files with 9 additions and 2 deletions

View File

@@ -21,7 +21,9 @@
*/
#include <linux/buffer_head.h>
#include <linux/sched.h>
#include <linux/swap.h>
#include <linux/writeback.h>
#include "attrib.h"
#include "debug.h"
@@ -2590,6 +2592,8 @@ int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val)
/* Finally unlock and release the page. */
unlock_page(page);
page_cache_release(page);
balance_dirty_pages_ratelimited(mapping);
cond_resched();
}
/* If there is a last partial page, need to do it the slow way. */
if (end_ofs) {