summaryrefslogtreecommitdiff
path: root/mm/shmem.c
diff options
context:
space:
mode:
authorTexas Instruments Auto Merger <lcpd_integration@list.ti.com>2015-01-29 20:12:15 -0600
committerTexas Instruments Auto Merger <lcpd_integration@list.ti.com>2015-01-29 20:12:15 -0600
commite9edf40c6f6cb39d7fe92da46c4b37c3e3ba32f6 (patch)
treeaa89d744151bd9359a0a55b9b05c3d64d84f5ade /mm/shmem.c
parentd298c0aeede322df16c97226784dba6e3ef66504 (diff)
parent016ea480c9ca2344006d3ef592a0154ba03b507a (diff)
Merge tag 'v3.14.31' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into ti-linux-3.14.y
This is the 3.14.31 stable release * tag 'v3.14.31' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (77 commits) Linux 3.14.31 md/raid5: fetch_block must fetch all the blocks handle_stripe_dirtying wants. mm: get rid of radix tree gfp mask for pagecache_get_page mm: page_alloc: reduce cost of the fair zone allocation policy mm: page_alloc: abort fair zone allocation policy when remotes nodes are encountered mm: vmscan: only update per-cpu thresholds for online CPU mm: move zone->pages_scanned into a vmstat counter mm: rearrange zone fields into read-only, page alloc, statistics and page reclaim lines mm: pagemap: avoid unnecessary overhead when tracepoints are deactivated memcg, vmscan: Fix forced scan of anonymous pages vmalloc: use rcu list iterator to reduce vmap_area_lock contention mm: make copy_pte_range static again mm, thp: only collapse hugepages to nodes with affinity for zone_reclaim_mode mm/memory.c: use entry = ACCESS_ONCE(*pte) in handle_pte_fault() shmem: fix init_page_accessed use to stop !PageLRU bug mm: avoid unnecessary atomic operations during end_page_writeback() mm: non-atomically mark page accessed during page cache allocation where possible fs: buffer: do not use unnecessary atomic operations when discarding buffers mm: do not use unnecessary atomic operations when adding pages to the LRU mm: do not use atomic operations when releasing pages ... Signed-off-by: Texas Instruments Auto Merger <lcpd_integration@list.ti.com>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 0f1447563f1..85d8a1a3626 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1035,6 +1035,9 @@ repeat:
goto failed;
}
+ if (page && sgp == SGP_WRITE)
+ mark_page_accessed(page);
+
/* fallocated page? */
if (page && !PageUptodate(page)) {
if (sgp != SGP_READ)
@@ -1116,6 +1119,9 @@ repeat:
shmem_recalc_inode(inode);
spin_unlock(&info->lock);
+ if (sgp == SGP_WRITE)
+ mark_page_accessed(page);
+
delete_from_swap_cache(page);
set_page_dirty(page);
swap_free(swap);
@@ -1140,8 +1146,11 @@ repeat:
goto decused;
}
- SetPageSwapBacked(page);
+ __SetPageSwapBacked(page);
__set_page_locked(page);
+ if (sgp == SGP_WRITE)
+ init_page_accessed(page);
+
error = mem_cgroup_cache_charge(page, current->mm,
gfp & GFP_RECLAIM_MASK);
if (error)