aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ntfs/ChangeLog4
-rw-r--r--fs/ntfs/attrib.c4
-rw-r--r--fs/ntfs/malloc.h3
3 files changed, 9 insertions, 2 deletions
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog
index 9f4674a026f2..3b8ff2318085 100644
--- a/fs/ntfs/ChangeLog
+++ b/fs/ntfs/ChangeLog
@@ -57,6 +57,10 @@ ToDo/Notes:
57 uncompressed and unencrypted files are supported. Also, there is 57 uncompressed and unencrypted files are supported. Also, there is
58 only very limited support for highly fragmented files (the ones whose 58 only very limited support for highly fragmented files (the ones whose
59 $DATA attribute is split into multiple attribute extents). 59 $DATA attribute is split into multiple attribute extents).
60 - In attrib.c::ntfs_attr_set() call balance_dirty_pages_ratelimited()
61 and cond_resched() in the main loop as we could be dirtying a lot of
62 pages and this ensures we play nice with the VM and the system as a
63 whole.
60 64
612.1.24 - Lots of bug fixes and support more clean journal states. 652.1.24 - Lots of bug fixes and support more clean journal states.
62 66
diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c
index bc25e88ad468..338e47144fc9 100644
--- a/fs/ntfs/attrib.c
+++ b/fs/ntfs/attrib.c
@@ -21,7 +21,9 @@
21 */ 21 */
22 22
23#include <linux/buffer_head.h> 23#include <linux/buffer_head.h>
24#include <linux/sched.h>
24#include <linux/swap.h> 25#include <linux/swap.h>
26#include <linux/writeback.h>
25 27
26#include "attrib.h" 28#include "attrib.h"
27#include "debug.h" 29#include "debug.h"
@@ -2590,6 +2592,8 @@ int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val)
2590 /* Finally unlock and release the page. */ 2592 /* Finally unlock and release the page. */
2591 unlock_page(page); 2593 unlock_page(page);
2592 page_cache_release(page); 2594 page_cache_release(page);
2595 balance_dirty_pages_ratelimited(mapping);
2596 cond_resched();
2593 } 2597 }
2594 /* If there is a last partial page, need to do it the slow way. */ 2598 /* If there is a last partial page, need to do it the slow way. */
2595 if (end_ofs) { 2599 if (end_ofs) {
diff --git a/fs/ntfs/malloc.h b/fs/ntfs/malloc.h
index 590887b943f5..e38e402e4103 100644
--- a/fs/ntfs/malloc.h
+++ b/fs/ntfs/malloc.h
@@ -39,8 +39,7 @@
39 * If there was insufficient memory to complete the request, return NULL. 39 * If there was insufficient memory to complete the request, return NULL.
40 * Depending on @gfp_mask the allocation may be guaranteed to succeed. 40 * Depending on @gfp_mask the allocation may be guaranteed to succeed.
41 */ 41 */
42static inline void *__ntfs_malloc(unsigned long size, 42static inline void *__ntfs_malloc(unsigned long size, gfp_t gfp_mask)
43 gfp_t gfp_mask)
44{ 43{
45 if (likely(size <= PAGE_SIZE)) { 44 if (likely(size <= PAGE_SIZE)) {
46 BUG_ON(!size); 45 BUG_ON(!size);