From 7419ed112bd430732e0d04fb722468980abc732f Mon Sep 17 00:00:00 2001 From: Anton Altaparmakov Date: Tue, 11 Oct 2005 14:54:42 +0100 Subject: [PATCH] --- yaml --- r: 11969 b: refs/heads/master c: 29b8990513b077dc388b0756acd31465e5c21441 h: refs/heads/master i: 11967: 44a80c55a3a2cf05c78b48ab07c5556af7988d19 v: v3 --- [refs] | 2 +- trunk/fs/ntfs/ChangeLog | 4 ++++ trunk/fs/ntfs/attrib.c | 4 ++++ trunk/fs/ntfs/malloc.h | 3 +-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 5406a8aa0d67..57cb00faa960 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 29d8699ebb1e8948a612306c69e6d9c4ef23342f +refs/heads/master: 29b8990513b077dc388b0756acd31465e5c21441 diff --git a/trunk/fs/ntfs/ChangeLog b/trunk/fs/ntfs/ChangeLog index 9f4674a026f2..3b8ff2318085 100644 --- a/trunk/fs/ntfs/ChangeLog +++ b/trunk/fs/ntfs/ChangeLog @@ -57,6 +57,10 @@ ToDo/Notes: uncompressed and unencrypted files are supported. Also, there is only very limited support for highly fragmented files (the ones whose $DATA attribute is split into multiple attribute extents). + - 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. 2.1.24 - Lots of bug fixes and support more clean journal states. diff --git a/trunk/fs/ntfs/attrib.c b/trunk/fs/ntfs/attrib.c index bc25e88ad468..338e47144fc9 100644 --- a/trunk/fs/ntfs/attrib.c +++ b/trunk/fs/ntfs/attrib.c @@ -21,7 +21,9 @@ */ #include +#include #include +#include #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) { diff --git a/trunk/fs/ntfs/malloc.h b/trunk/fs/ntfs/malloc.h index 590887b943f5..e38e402e4103 100644 --- a/trunk/fs/ntfs/malloc.h +++ b/trunk/fs/ntfs/malloc.h @@ -39,8 +39,7 @@ * If there was insufficient memory to complete the request, return NULL. * Depending on @gfp_mask the allocation may be guaranteed to succeed. */ -static inline void *__ntfs_malloc(unsigned long size, - gfp_t gfp_mask) +static inline void *__ntfs_malloc(unsigned long size, gfp_t gfp_mask) { if (likely(size <= PAGE_SIZE)) { BUG_ON(!size);