android_kernel_oneplus_msm8998/mm
Kirill A. Shutemov 20e044155f page-flags: define PG_locked behavior on compound pages
lock_page() must operate on the whole compound page.  It doesn't make
much sense to lock part of compound page.  Change code to use head
page's PG_locked, if tail page is passed.

This patch also gets rid of custom helper functions --
__set_page_locked() and __clear_page_locked().  They are replaced with
helpers generated by __SETPAGEFLAG/__CLEARPAGEFLAG.  Tail pages to these
helper would trigger VM_BUG_ON().

SLUB uses PG_locked as a bit spin locked.  IIUC, tail pages should never
appear there.  VM_BUG_ON() is added to make sure that this assumption is
correct.

[akpm@linux-foundation.org: fix fs/cifs/file.c]
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Lameter <cl@linux.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Steve Capper <steve.capper@linaro.org>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Jerome Marchand <jmarchan@redhat.com>
Cc: Jérôme Glisse <jglisse@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: Ifeeb98c789880ff34b286383568db60e08672205
Git-Commit: 48c935ad88f5be20eb5445a77c171351b1eb5111
Git-Repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2018-10-01 14:31:29 +05:30
..
kasan Merge android-4.4.135 (c9d74f2) into msm-4.4 2018-06-27 14:42:55 +05:30
backing-dev.c Merge android-4.4.127 (d6bbe8b) into msm-4.4 2018-04-20 12:27:57 +05:30
balloon_compaction.c mm: balloon: use general non-lru movable page feature 2017-02-21 12:38:41 +05:30
bootmem.c
cleancache.c
cma.c Merge android-4.4.114 (fe09418) into msm-4.4 2018-02-01 14:02:45 +05:30
cma.h
cma_debug.c
compaction.c mm/migration: make isolate_movable_page() return int type 2018-02-22 17:51:25 +05:30
debug.c mm, page_owner: dump page owner info from dump_page() 2017-07-07 15:12:10 +05:30
dmapool.c BACKPORT: mm: coalesce split strings 2017-12-14 08:21:34 -08:00
early_ioremap.c mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep 2018-02-25 11:03:41 +01:00
fadvise.c
failslab.c
filemap.c page-flags: define PG_locked behavior on compound pages 2018-10-01 14:31:29 +05:30
frame_vector.c
frontswap.c
gup.c mm: larger stack guard gap, between vmas 2017-06-26 07:13:11 +02:00
highmem.c
huge_memory.c This is the 4.4.106 stable release 2017-12-18 10:49:53 +01:00
hugetlb.c mm: hugetlb: yield when prepping struct pages 2018-07-11 16:03:48 +02:00
hugetlb_cgroup.c
hwpoison-inject.c
init-mm.c mm: Add a user_ns owner to mm_struct and fix ptrace permission checks 2017-01-06 11:16:11 +01:00
internal.h Merge android-4.4@4b8fc9f (v4.4.82) into msm-4.4 2017-09-01 11:47:49 -07:00
interval_tree.c
Kconfig Merge android-4.4.133 (3f51ea2) into msm-4.4 2018-05-31 12:28:38 +05:30
Kconfig.debug mm: allow page poisoning to be enabled by default. 2017-04-14 23:43:05 +05:30
kmemcheck.c BACKPORT: mm: coalesce split strings 2017-12-14 08:21:34 -08:00
kmemleak-test.c
kmemleak.c Merge android-4.4.135 (c9d74f2) into msm-4.4 2018-06-27 14:42:55 +05:30
ksm.c page-flags: define PG_locked behavior on compound pages 2018-10-01 14:31:29 +05:30
list_lru.c mm/list_lru.c: fix list_lru_count_node() to be race free 2017-07-21 07:44:56 +02:00
maccess.c x86: remove more uaccess_32.h complexity 2016-08-27 11:23:38 +08:00
madvise.c This is the 4.4.104 stable release 2017-12-05 11:31:58 +01:00
Makefile Merge android-4.4.107 (79f138a) into msm-4.4 2018-01-18 12:49:58 +05:30
memblock.c Merge android-4.4.106 (2fea039) into msm-4.4 2018-01-18 12:45:07 +05:30
memcontrol.c mm: memcg: fix use after free in mem_cgroup_iter() 2018-07-25 10:18:16 +02:00
memory-failure.c page-flags: define PG_locked behavior on compound pages 2018-10-01 14:31:29 +05:30
memory.c Merge android-4.4.148 (f057ff9) into msm-4.4 2018-08-24 00:07:01 +05:30
memory_hotplug.c mm/hotplug: enable memory hotplug for non-lru movable pages 2018-02-22 17:51:21 +05:30
mempolicy.c This is the 4.4.134 stable release 2018-05-30 13:25:24 +02:00
mempool.c UPSTREAM: mm: mempool: kasan: don't poot mempool objects in quarantine 2017-12-14 08:20:25 -08:00
memtest.c lib: memtest: Add MEMTEST_ENABLE_DEFAULT option 2016-05-05 15:05:52 -07:00
migrate.c page-flags: define PG_locked behavior on compound pages 2018-10-01 14:31:29 +05:30
mincore.c
mlock.c This is the 4.4.71 stable release 2017-06-07 12:36:01 +02:00
mm_init.c
mmap.c Merge android-4.4.137 (a2e2217) into msm-4.4 2018-06-27 14:45:25 +05:30
mmu_context.c mm/mmu_context, sched/core: Fix mmu_context.h assumption 2017-12-25 14:22:09 +01:00
mmu_notifier.c
mmzone.c
mprotect.c This is the 4.4.148 stable release 2018-08-15 18:20:41 +02:00
mremap.c mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries 2017-08-11 09:08:50 -07:00
msync.c
nobootmem.c
nommu.c mm: treat indirectly reclaimable memory as free in overcommit logic 2018-05-08 11:08:42 +05:30
oom_kill.c Merge android-4.4.106 (2fea039) into msm-4.4 2018-01-18 12:45:07 +05:30
page-writeback.c Merge android-4.4.142 (8ec9fd8) into msm-4.4 2018-08-03 16:59:20 +05:30
page_alloc.c Merge android-4.4.140 (789274d) into msm-4.4 2018-07-18 15:09:28 +05:30
page_counter.c
page_ext.c platform: msm: resolve NULL pointer dereference issue 2018-08-16 11:45:37 +08:00
page_idle.c
page_io.c
page_isolation.c mm/page_alloc: introduce post allocation processing on page allocator 2017-07-07 15:39:34 +05:30
page_owner.c mm: check the return value of lookup_page_ext for all call sites 2017-11-24 08:32:25 +01:00
page_poison.c mm: allow page poisoning to be enabled by default. 2017-04-14 23:43:05 +05:30
pagewalk.c mm/pagewalk.c: report holes in hugetlb ranges 2017-11-24 08:32:25 +01:00
percpu-km.c
percpu-vm.c
percpu.c This is the 4.4.132 stable release 2018-05-16 11:32:47 +02:00
pgtable-generic.c
process_reclaim.c lowmemorykiller: Introduce sysfs node for ALMK and PPR adj threshold 2016-12-17 16:16:17 +05:30
process_vm_access.c BACKPORT: ptrace: use fsuid, fsgid, effective creds for fs access checks 2016-07-07 16:30:43 -07:00
quicklist.c
readahead.c
rmap.c Merge android-4.4.108 (55b3b8c) into msm-4.4 2018-01-18 12:50:06 +05:30
shmem.c page-flags: define PG_locked behavior on compound pages 2018-10-01 14:31:29 +05:30
showmem.c
slab.c This is the 4.4.129 stable release 2018-04-24 10:42:34 +02:00
slab.h UPSTREAM: mm: kasan: initial memory quarantine implementation 2017-12-14 08:20:07 -08:00
slab_common.c BACKPORT: kasan: drain quarantine of memcg slab objects 2017-12-14 08:24:57 -08:00
slob.c
slub.c page-flags: define PG_locked behavior on compound pages 2018-10-01 14:31:29 +05:30
sparse-vmemmap.c BACKPORT: mm: coalesce split strings 2017-12-14 08:21:34 -08:00
sparse.c BACKPORT: mm: coalesce split strings 2017-12-14 08:21:34 -08:00
swap.c mm: remove nr_pages argument from pagevec_lookup_{,range}_tag() 2018-07-08 17:37:49 -07:00
swap_cgroup.c mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff() 2017-07-05 14:37:15 +02:00
swap_ratio.c mm: swap_ratio: bail out if there aren't any other swap device 2016-05-31 15:23:38 -07:00
swap_state.c page-flags: define PG_locked behavior on compound pages 2018-10-01 14:31:29 +05:30
swapfile.c Merge android-4.4.148 (f057ff9) into msm-4.4 2018-08-24 00:07:01 +05:30
truncate.c Merge branch 'android-4.4@e76c0fa' into branch 'msm-4.4' 2017-06-20 14:55:15 -07:00
usercopy.c mm: Fix build for hardened usercopy 2016-10-12 22:35:30 +05:30
userfaultfd.c
util.c Merge android-4.4.133 (3f51ea2) into msm-4.4 2018-05-31 12:28:38 +05:30
vmacache.c
vmalloc.c Merge android-4.4.146 (13962260) into msm-4.4 2018-08-07 15:36:56 +05:30
vmpressure.c mm: vmpressure: fix sending wrong events on underflow 2017-03-12 06:37:25 +01:00
vmscan.c page-flags: define PG_locked behavior on compound pages 2018-10-01 14:31:29 +05:30
vmstat.c mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES 2018-05-07 10:44:31 +05:30
workingset.c mm: workingset: fix crash in shadow node shrinker caused by replace_page_cache_page() 2016-10-28 03:01:34 -04:00
zbud.c mm: zbud: fix the locking scenarios with zcache 2016-08-25 11:49:45 +05:30
zcache.c mm: zcache: fix merge issues 2016-06-07 11:57:44 -07:00
zpool.c
zsmalloc.c mm: fix build warnings in <linux/compaction.h> 2017-02-21 12:41:38 +05:30
zswap.c zswap: don't param_set_charp while holding spinlock 2018-01-17 09:35:27 +01:00