linux-sg2042/arch/nds32/kernel
Michel Lespinasse d8ed45c5dc mmap locking API: use coccinelle to convert mmap_sem rwsem call sites
This change converts the existing mmap_sem rwsem calls to use the new mmap
locking API instead.

The change is generated using coccinelle with the following rule:

// spatch --sp-file mmap_lock_api.cocci --in-place --include-headers --dir .

@@
expression mm;
@@
(
-init_rwsem
+mmap_init_lock
|
-down_write
+mmap_write_lock
|
-down_write_killable
+mmap_write_lock_killable
|
-down_write_trylock
+mmap_write_trylock
|
-up_write
+mmap_write_unlock
|
-downgrade_write
+mmap_write_downgrade
|
-down_read
+mmap_read_lock
|
-down_read_killable
+mmap_read_lock_killable
|
-down_read_trylock
+mmap_read_trylock
|
-up_read
+mmap_read_unlock
)
-(&mm->mmap_sem)
+(mm)

Signed-off-by: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Reviewed-by: Laurent Dufour <ldufour@linux.ibm.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Liam Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ying Han <yinghan@google.com>
Link: http://lkml.kernel.org/r/20200520052908.204642-5-walken@google.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-09 09:39:14 -07:00
..
vdso .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
asm-offsets.c nds32: Assembly macros and definitions 2018-02-22 10:44:31 +08:00
atl2c.c nds32: add NULL entry to the end of_device_id array 2018-09-04 14:45:15 +08:00
cacheinfo.c nds32: fix semicolon code style issue 2019-05-07 17:52:10 +08:00
devtree.c nds32: Device tree support 2018-02-22 10:44:34 +08:00
dma.c dma-mapping: drop the dev argument to arch_sync_dma_for_* 2019-11-20 20:31:38 +01:00
ex-entry.S nds32: nds32 FPU port 2018-11-22 18:13:13 +08:00
ex-exit.S sched/rt, nds32: Use CONFIG_PREEMPTION 2019-12-08 14:37:34 +01:00
ex-scall.S nds32: nds32 FPU port 2018-11-22 18:13:13 +08:00
fpu.c Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2019-07-08 21:48:15 -07:00
ftrace.c module: Remove set_all_modules_text_*() 2019-11-27 07:44:25 +01:00
head.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
irq.c nds32: IRQ handling 2018-02-22 10:44:32 +08:00
module.c mm: introduce include/linux/pgtable.h 2020-06-09 09:39:13 -07:00
nds32_ksyms.c nds32: don't export low-level cache flushing routines 2019-05-16 14:40:26 +08:00
perf_event_cpu.c nds32: Move static keyword to the front of declaration 2019-11-21 16:05:15 +08:00
pm.c nds32: use pgtable-nopmd instead of 4level-fixup 2019-12-04 19:44:15 -08:00
process.c get rid of legacy 'get_ds()' function 2019-03-04 10:50:14 -08:00
ptrace.c nds32: Debugging support 2018-02-22 10:44:34 +08:00
setup.c arch/nds32/setup: Drop dummy_con initialization 2020-01-14 15:29:17 +01:00
signal.c nds32: Mark expected switch fall-throughs 2019-08-29 11:06:56 -05:00
sleep.S nds32: nds32 FPU port 2018-11-22 18:13:13 +08:00
stacktrace.c nds32: Add macro definition for offset of lp register on stack 2018-09-04 14:45:19 +08:00
sys_nds32.c nds32: Avoid IEX status being incorrectly modified 2019-05-31 15:23:26 +08:00
syscall_table.c nds32: System calls handling 2018-02-22 10:44:33 +08:00
time.c nds32: Generic timers support 2018-02-22 10:44:34 +08:00
traps.c kernel: rename show_stack_loglvl() => show_stack() 2020-06-09 09:39:13 -07:00
vdso.c mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
vmlinux.lds.S kasan: stackdepot: move filter_irq_stacks() to stackdepot.c 2020-04-07 10:43:43 -07:00