summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/page-writeback.c10
-rw-r--r--mm/shmem.c2
2 files changed, 11 insertions, 1 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index be0efbde499..438833cbbca 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -737,6 +737,16 @@ int write_one_page(struct page *page, int wait)
EXPORT_SYMBOL(write_one_page);
/*
+ * For address_spaces which do not use buffers nor write back.
+ */
+int __set_page_dirty_no_writeback(struct page *page)
+{
+ if (!PageDirty(page))
+ SetPageDirty(page);
+ return 0;
+}
+
+/*
* For address_spaces which do not use buffers. Just tag the page as dirty in
* its radix tree.
*
diff --git a/mm/shmem.c b/mm/shmem.c
index 70da7a0981b..b38e1716927 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2316,7 +2316,7 @@ static void destroy_inodecache(void)
static const struct address_space_operations shmem_aops = {
.writepage = shmem_writepage,
- .set_page_dirty = __set_page_dirty_nobuffers,
+ .set_page_dirty = __set_page_dirty_no_writeback,
#ifdef CONFIG_TMPFS
.prepare_write = shmem_prepare_write,
.commit_write = simple_commit_write,