]> Git Repo - linux.git/log
linux.git
8 years agoscripts/spelling.txt: add "followings" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:56 +0000 (14:29 -0800)]
scripts/spelling.txt: add "followings" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  followings||following

While we are here, add a missing colon in the boilerplate in DT binding
documents.  The "you SoC" in allwinner,sunxi-pinctrl.txt was fixed as
well.

I reworded "as the followings:" to "as follows:" for
drivers/usb/gadget/udc/renesas_usb3.c.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "therfore" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:53 +0000 (14:29 -0800)]
scripts/spelling.txt: add "therfore" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  therfore||therefore

Besides, tidy up comment blocks for 80-col wrapping.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "overwriten" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:50 +0000 (14:29 -0800)]
scripts/spelling.txt: add "overwriten" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  overwrien||overwritten

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "overwritting" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:48 +0000 (14:29 -0800)]
scripts/spelling.txt: add "overwritting" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  overwritting||overwriting

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "deintialize(d)" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:45 +0000 (14:29 -0800)]
scripts/spelling.txt: add "deintialize(d)" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  deintializing||deinitializing
  deintialize||deinitialize
  deintialized||deinitialized

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "disassocation" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:42 +0000 (14:29 -0800)]
scripts/spelling.txt: add "disassocation" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  disassocation||disassociation

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "omited" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:39 +0000 (14:29 -0800)]
scripts/spelling.txt: add "omited" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  omited||omitted
  omiting||omitting

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "explictely" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:36 +0000 (14:29 -0800)]
scripts/spelling.txt: add "explictely" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  explictely||explicitly

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "applys" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:34 +0000 (14:29 -0800)]
scripts/spelling.txt: add "applys" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  applys||applies

The "applyes" in drivers/video/fbdev/aty/radeon_monitor.c is a different
pattern but it was fixed in this commit.  The "This functions" in the
same line was fixed as well.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "configuartion" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:31 +0000 (14:29 -0800)]
scripts/spelling.txt: add "configuartion" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  configuartion||configuration

While we are here, fix the "ouput" as well in the touched hunk in
drivers/media/dvb-frontends/drx39xyj/drx_driver.h.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "overrided" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:28 +0000 (14:29 -0800)]
scripts/spelling.txt: add "overrided" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  overrided||overridden

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "comsume(r)" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:25 +0000 (14:29 -0800)]
scripts/spelling.txt: add "comsume(r)" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  comsume||consume
  comsumer||consumer
  comsuming||consuming

I see some variable names with this pattern, but this commit is only
touching comment blocks to avoid unexpected impact.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "initialiazation" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:23 +0000 (14:29 -0800)]
scripts/spelling.txt: add "initialiazation" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  initialiazation||initialization

While we are here, fix the "overriden" in the touched line in
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "intialization" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:20 +0000 (14:29 -0800)]
scripts/spelling.txt: add "intialization" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  intialization||initialization

The "inintialization" in drivers/acpi/spcr.c is a different pattern but
I fixed it as well in this commit.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "unneded" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:17 +0000 (14:29 -0800)]
scripts/spelling.txt: add "unneded" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  unneded||unneeded

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "neded" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:14 +0000 (14:29 -0800)]
scripts/spelling.txt: add "neded" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  neded||needed

While we are here, fix the "overriden", "wont", and "etc" in the same
hunk in drivers/media/usb/tm6000/tm6000-input.c.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "againt" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:12 +0000 (14:29 -0800)]
scripts/spelling.txt: add "againt" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  againt||against

While we are here, fix the "capabilites" as well in the touched hunk in
drivers/gpu/drm/drm_probe_helper.c.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "embeded" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:09 +0000 (14:29 -0800)]
scripts/spelling.txt: add "embeded" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  embeded||embedded

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "varible" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:06 +0000 (14:29 -0800)]
scripts/spelling.txt: add "varible" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  varible||variable

While we are here, tidy up the comment blocks that fit in a single line
for drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c and
net/sctp/transport.c.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "efective" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:03 +0000 (14:29 -0800)]
scripts/spelling.txt: add "efective" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  efective||effective

While we are here, fix the "addres" as well in the touched line in
arch/openrisc/kernel/entry.S.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "algined" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:29:01 +0000 (14:29 -0800)]
scripts/spelling.txt: add "algined" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  algined||aligned

While we are here, fix the "appplication" in the touched line in
drivers/block/loop.c.  Also, fix the "may not naturally ..." to
"may not be naturally ..." in the touched line in mm/page_alloc.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "aligment" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:28:58 +0000 (14:28 -0800)]
scripts/spelling.txt: add "aligment" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  aligment||alignment

I did not touch the "N_BYTE_ALIGMENT" macro in
drivers/net/wireless/realtek/rtlwifi/wifi.h to avoid unpredictable
impact.

I fixed "_aligment_handler" in arch/openrisc/kernel/entry.S because
it is surrounded by #if 0 ... #endif.  It is surely safe and I
confirmed "_alignment_handler" is correct.

I also fixed the "controler" I found in the same hunk in
arch/openrisc/kernel/head.S.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "partiton" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:28:55 +0000 (14:28 -0800)]
scripts/spelling.txt: add "partiton" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  partiton||partition

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "an one" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:28:52 +0000 (14:28 -0800)]
scripts/spelling.txt: add "an one" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  an one||a one

I dropped the "an" before "one or more" in
drivers/net/ethernet/sfc/mcdi_pcol.h.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "an union" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:28:49 +0000 (14:28 -0800)]
scripts/spelling.txt: add "an union" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  an union||a union

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "an user" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:28:47 +0000 (14:28 -0800)]
scripts/spelling.txt: add "an user" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  an user||a user
  an userspace||a userspace

I also added "userspace" to the list since it is a common word in Linux.
I found some instances for "an userfaultfd", but I did not add it to the
list.  I felt it is endless to find words that start with "user" such as
"userland" etc., so must draw a line somewhere.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "swithc" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:28:44 +0000 (14:28 -0800)]
scripts/spelling.txt: add "swithc" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  swithc||switch
  swithced||switched
  swithcing||switching

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscripts/spelling.txt: add "swith" pattern and fix typo instances
Masahiro Yamada [Mon, 27 Feb 2017 22:28:41 +0000 (14:28 -0800)]
scripts/spelling.txt: add "swith" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

  swith||switch
  swithable||switchable
  swithed||switched
  swithing||switching

While we are here, fix the "update" to "updates" in the touched hunk in
drivers/net/wireless/marvell/mwifiex/wmm.c.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agonilfs2: use i_blocksize()
Geliang Tang [Mon, 27 Feb 2017 22:28:38 +0000 (14:28 -0800)]
nilfs2: use i_blocksize()

Since i_blocksize() helper has been defined in fs.h, use it instead of
open-coding.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Ryusuke Konishi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agonilfs2: use nilfs_btree_node_size()
Geliang Tang [Mon, 27 Feb 2017 22:28:35 +0000 (14:28 -0800)]
nilfs2: use nilfs_btree_node_size()

Use nilfs_btree_node_size() instead of open-coding.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Ryusuke Konishi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agofs: add i_blocksize()
Fabian Frederick [Mon, 27 Feb 2017 22:28:32 +0000 (14:28 -0800)]
fs: add i_blocksize()

Replace all 1 << inode->i_blkbits and (1 << inode->i_blkbits) in fs
branch.

This patch also fixes multiple checkpatch warnings: WARNING: Prefer
'unsigned int' to bare use of 'unsigned'

Thanks to Andrew Morton for suggesting more appropriate function instead
of macro.

[[email protected]: truncate: use i_blocksize()]
Link: http://lkml.kernel.org/r/9c8b2cd83c8f5653805d43debde9fa8817e02fc4.1484895804.git.geliangtang@gmail.com
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: Geliang Tang <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Ross Zwisler <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscatterlist: do not disable IRQs in sg_copy_buffer
Gilad Ben-Yossef [Mon, 27 Feb 2017 22:28:29 +0000 (14:28 -0800)]
scatterlist: do not disable IRQs in sg_copy_buffer

Commit 50bed2e2862a ("sg: disable interrupts inside sg_copy_buffer")
introduced disabling interrupts in sg_copy_buffer() since atomic uses of
miter required it due to use of kmap_atomic().

However, as commit 8290e2d2dcbf ("scatterlist: atomic sg_mapping_iter()
no longer needs disabled IRQs") acknowledges disabling interrupts is no
longer needed for calls to kmap_atomic() and therefore unneeded for
miter ops either, so remove it from sg_copy_buffer().

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Gilad Ben-Yossef <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoscatterlist: reorder compound boolean expression
Gilad Ben-Yossef [Mon, 27 Feb 2017 22:28:27 +0000 (14:28 -0800)]
scatterlist: reorder compound boolean expression

Test the cheaper boolean expression with no side effects first.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Gilad Ben-Yossef <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoipc/shm: Fix shmat mmap nil-page protection
Davidlohr Bueso [Mon, 27 Feb 2017 22:28:24 +0000 (14:28 -0800)]
ipc/shm: Fix shmat mmap nil-page protection

The issue is described here, with a nice testcase:

    https://bugzilla.kernel.org/show_bug.cgi?id=192931

The problem is that shmat() calls do_mmap_pgoff() with MAP_FIXED, and
the address rounded down to 0.  For the regular mmap case, the
protection mentioned above is that the kernel gets to generate the
address -- arch_get_unmapped_area() will always check for MAP_FIXED and
return that address.  So by the time we do security_mmap_addr(0) things
get funky for shmat().

The testcase itself shows that while a regular user crashes, root will
not have a problem attaching a nil-page.  There are two possible fixes
to this.  The first, and which this patch does, is to simply allow root
to crash as well -- this is also regular mmap behavior, ie when hacking
up the testcase and adding mmap(...  |MAP_FIXED).  While this approach
is the safer option, the second alternative is to ignore SHM_RND if the
rounded address is 0, thus only having MAP_SHARED flags.  This makes the
behavior of shmat() identical to the mmap() case.  The downside of this
is obviously user visible, but does make sense in that it maintains
semantics after the round-down wrt 0 address and mmap.

Passes shm related ltp tests.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Davidlohr Bueso <[email protected]>
Reported-by: Gareth Evans <[email protected]>
Cc: Manfred Spraul <[email protected]>
Cc: Michael Kerrisk <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoipc/mqueue: add missing sparse annotation
Luc Van Oostenryck [Mon, 27 Feb 2017 22:28:21 +0000 (14:28 -0800)]
ipc/mqueue: add missing sparse annotation

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Luc Van Oostenryck <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoipc/sem: add hysteresis
Manfred Spraul [Mon, 27 Feb 2017 22:28:18 +0000 (14:28 -0800)]
ipc/sem: add hysteresis

sysv sem has two lock modes: One with per-semaphore locks, one lock mode
with a single global lock for the whole array.  When switching from the
per-semaphore locks to the global lock, all per-semaphore locks must be
scanned for ongoing operations.

The patch adds a hysteresis for switching from the global lock to the
per semaphore locks.  This reduces how often the per-semaphore locks
must be scanned.

Compared to the initial patch, this is a simplified solution: Setting
USE_GLOBAL_LOCK_HYSTERESIS to 1 restores the current behavior.

In theory, a workload with exactly 10 simple sops and then one complex
op now scales a bit worse, but this is pure theory: If there is
concurrency, the it won't be exactly 10:1:10:1:10:1:...  If there is no
concurrency, then there is no need for scalability.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Manfred Spraul <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: <[email protected]>
Cc: kernel test robot <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoipc/sem.c: avoid using spin_unlock_wait()
Manfred Spraul [Mon, 27 Feb 2017 22:28:15 +0000 (14:28 -0800)]
ipc/sem.c: avoid using spin_unlock_wait()

a) The ACQUIRE in spin_lock() applies to the read, not to the store, at
   least for powerpc.  This forces to add a smp_mb() into the fast path.

b) The memory barrier provided by spin_unlock_wait() is right now arch
   dependent.

Therefore: Use spin_lock()/spin_unlock() instead of spin_unlock_wait().

Advantage: faster single op semop calls(), observed +8.9% on x86.  (the
other solution would be arch dependencies in ipc/sem).

Disadvantage: slower complex op semop calls, if (and only if) there are
no sleeping operations.

The next patch adds hysteresis, this further reduces the probability
that the slow path is used.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Manfred Spraul <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: <[email protected]>
Cc: kernel test robot <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoinitramfs: finish fput() before accessing any binary from initramfs
Lokesh Vutla [Mon, 27 Feb 2017 22:28:12 +0000 (14:28 -0800)]
initramfs: finish fput() before accessing any binary from initramfs

Commit 4a9d4b024a31 ("switch fput to task_work_add") implements a
schedule_work() for completing fput(), but did not guarantee calling
__fput() after unpacking initramfs.  Because of this, there is a
possibility that during boot a driver can see ETXTBSY when it tries to
load a binary from initramfs as fput() is still pending on that binary.

This patch makes sure that fput() is completed after unpacking initramfs
and removes the call to flush_delayed_fput() in kernel_init() which
happens very late after unpacking initramfs.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Lokesh Vutla <[email protected]>
Reported-by: Murali Karicheri <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Tero Kristo <[email protected]>
Cc: Sekhar Nori <[email protected]>
Cc: Nishanth Menon <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agolib/fonts/Kconfig: keep non-Sparc fonts listed together
Randy Dunlap [Mon, 27 Feb 2017 22:28:09 +0000 (14:28 -0800)]
lib/fonts/Kconfig: keep non-Sparc fonts listed together

Keep fonts together and indented (in menu) as much as possible.  This
moves the Sparc font choices to the end of the menu since they have
different dependencies.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Randy Dunlap <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoconfig: android-base: enable hardened usercopy and kernel ASLR
Amit Pundir [Mon, 27 Feb 2017 22:28:06 +0000 (14:28 -0800)]
config: android-base: enable hardened usercopy and kernel ASLR

Enable CONFIG_HARDENED_USERCOPY and CONFIG_RANDOMIZE_BASE in Android
base config fragment.

Reviewed at https://android-review.googlesource.com/#/c/283659/
Reviewed at https://android-review.googlesource.com/#/c/278133/

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Amit Pundir <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: John Stultz <[email protected]>
Cc: Daniel Micay <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoconfig: android-recommended: disable aio support
Daniel Micay [Mon, 27 Feb 2017 22:28:03 +0000 (14:28 -0800)]
config: android-recommended: disable aio support

The aio interface adds substantial attack surface for a feature that's
not being exposed by Android at all.  It's unlikely that anyone is using
the kernel feature directly either.  This feature is rarely used even on
servers.  The glibc POSIX aio calls really use thread pools.  The lack
of widespread usage also means this is relatively poorly audited/tested.

The kernel's aio rarely provides performance benefits over using a
thread pool and is quite incomplete in terms of system call coverage
along with having edge cases where blocking can occur.  Part of the
performance issue is the fact that it only supports direct io, not
buffered io.  The existing API is considered fundamentally flawed and
it's unlikely it will be expanded, but rather replaced:

  https://marc.info/?l=linux-aio&m=145255815216051&w=2

Since ext4 encryption means no direct io support, kernel aio isn't even
going to work properly on Android devices using file-based encryption.

Reviewed-at: https://android-review.googlesource.com/#/c/292158/

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Daniel Micay <[email protected]>
Signed-off-by: Amit Pundir <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: John Stultz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agofs/affs: make export work with cold dcache
Fabian Frederick [Mon, 27 Feb 2017 22:28:00 +0000 (14:28 -0800)]
fs/affs: make export work with cold dcache

This adds get_parent function so that nfs client can still work after
cache drop (Tested on NFS v4 with echo 3 > /proc/sys/vm/drop_caches)

[[email protected]: fix return value check in affs_get_parent()]
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: Wei Yongjun <[email protected]>
Suggested-by: Alexander Viro <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agofs/affs/namei.c: forward declarations clean-up
Fabian Frederick [Mon, 27 Feb 2017 22:27:57 +0000 (14:27 -0800)]
fs/affs/namei.c: forward declarations clean-up

Move dentry_operations structures and remove forward declarations.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Fabian Frederick <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agofs/affs: add prefix to some functions
Fabian Frederick [Mon, 27 Feb 2017 22:27:54 +0000 (14:27 -0800)]
fs/affs: add prefix to some functions

secs_to_datestamp(time64_t secs, struct affs_date *ds);
prot_to_mode(u32 prot);
mode_to_prot(struct inode *inode);

were declared without affs_ prefix

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Fabian Frederick <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agofs/affs: use octal for permissions
Fabian Frederick [Mon, 27 Feb 2017 22:27:52 +0000 (14:27 -0800)]
fs/affs: use octal for permissions

According to commit f90774e1fd27 ("checkpatch: look for symbolic
permissions and suggest octal instead")

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Fabian Frederick <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agofs/affs: make affs exportable
Fabian Frederick [Mon, 27 Feb 2017 22:27:49 +0000 (14:27 -0800)]
fs/affs: make affs exportable

Add standard functions making AFFS work with NFS.

Functions based on ext4 implementation.  Tested on loop device.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Fabian Frederick <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agofs/affs: add validation block function
Fabian Frederick [Mon, 27 Feb 2017 22:27:46 +0000 (14:27 -0800)]
fs/affs: add validation block function

Avoid repeating 4 times the same calculation.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Fabian Frederick <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agofs/affs: remove reference to affs_parent_ino()
Fabian Frederick [Mon, 27 Feb 2017 22:27:43 +0000 (14:27 -0800)]
fs/affs: remove reference to affs_parent_ino()

Patch series "make FS exportable plus some clean-up", v7.

This small patchset makes AFFS work with NFS for standard operations.

THis patch (of 7):

affs_parent_ino() was removed a long time ago.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Fabian Frederick <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agofs,eventpoll: don't test for bitfield with stack value
Cyrill Gorcunov [Mon, 27 Feb 2017 22:27:40 +0000 (14:27 -0800)]
fs,eventpoll: don't test for bitfield with stack value

In case if epoll_ctl is called with operation EPOLL_CTL_DEL then
@epds.events variable allocated on stack may contain random bits which
we test then for EPOLLEXCLUSIVE.  Since currently the test look like

if (epds.events & EPOLLEXCLUSIVE) {
if (op == EPOLL_CTL_MOD)
goto error_tgt_fput;
if (op == EPOLL_CTL_ADD && (is_file_epoll(tf.file) ||
(epds.events & ~EPOLLEXCLUSIVE_OK_BITS)))
goto error_tgt_fput;
}

Nothing serious will happen even if epds.events has this bit set, still
better to be on safe side and make sure that we're to test this bit at
all.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Cyrill Gorcunov <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Andrey Vagin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoinclude/linux/pid.h: use for_each_thread() in do_each_pid_thread()
Tetsuo Handa [Mon, 27 Feb 2017 22:27:37 +0000 (14:27 -0800)]
include/linux/pid.h: use for_each_thread() in do_each_pid_thread()

while_each_pid_thread() is using while_each_thread(), which is unsafe
under RCU lock according to commit 0c740d0afc3b ("introduce
for_each_thread() to replace the buggy while_each_thread()").  Use
for_each_thread() in do_each_pid_thread() which is safe under RCU lock.

Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/1486041779-4401-2-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp
Signed-off-by: Tetsuo Handa <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agorapidio: use get_user_pages_unlocked()
Lorenzo Stoakes [Mon, 27 Feb 2017 22:27:34 +0000 (14:27 -0800)]
rapidio: use get_user_pages_unlocked()

Moving from get_user_pages() to get_user_pages_unlocked() simplifies the
code and takes advantage of VM_FAULT_RETRY functionality when faulting
in pages.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Lorenzo Stoakes <[email protected]>
Acked-by: Alexandre Bounine <[email protected]>
Cc: Matt Porter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years ago/proc/kcore: update physical address for kcore ram and text
Pratyush Anand [Mon, 27 Feb 2017 22:27:31 +0000 (14:27 -0800)]
/proc/kcore: update physical address for kcore ram and text

Currently all the p_paddr of PT_LOAD headers are assigned to 0, which is
not true and could be misleading, since 0 is a valid physical address.

User space tools like makedumpfile needs to know physical address for
PT_LOAD segments of direct mapped regions.  Therefore this patch updates
paddr for such regions.  It also sets an invalid paddr (-1) for other
regions, so that user space tool can know whether a physical address
provided in PT_LOAD is correct or not.

I do not know why it was 0, which is a valid physical address.  But
certainly, it might break some user space tools, and those need to be
fixed.  For example, see following code from kexec-tools

kexec/kexec-elf.c:build_mem_phdrs()

                    if ((phdr->p_paddr + phdr->p_memsz) < phdr->p_paddr) {
                            /* The memory address wraps */
                            if (probe_debug) {
                                    fprintf(stderr, "ELF address wrap around\n");
                            }
                            return -1;
                    }

We do not need to perform above check for an invalid physical address.

I think, kexec-tools and makedumpfile will need fixup.  I already have
those fixup which will be sent upstream once this patch makes through.
Pro with this approach is that, it will help to calculate variable like
page_offset, phys_base from PT_LOAD even when they are randomized and
therefore will reduce many variable and version specific values in user
space tools.

Having an ASLR offset information can help to translate an identity
mapped virtual address to a physical address.  But that would be an
additional field in PT_LOAD header structure and an arch dependent
value.

Moreover, sending a valid physical address like 0 does not seem right.
So, IMHO it is better to fix that and send valid physical address when
available (identity mapped).

Link: http://lkml.kernel.org/r/f951340d2917cdd2a329fae9837a83f2059dc3b2.1485318868.git.panand@redhat.com
Signed-off-by: Pratyush Anand <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Dave Young <[email protected]>
Cc: Dave Anderson <[email protected]>
Cc: Atsushi Kumagai <[email protected]>
Cc: Simon Horman <[email protected]>
Cc: Kees Cook <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agotools/testing/selftests/sigaltstack/sas.c: improve output of sigaltstack testcase
Stas Sergeev [Mon, 27 Feb 2017 22:27:28 +0000 (14:27 -0800)]
tools/testing/selftests/sigaltstack/sas.c: improve output of sigaltstack testcase

Currently it uses %i for bitmasks, which makes it difficult to properly
decode the values.  Use %x instead.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Stas Sergeev <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agosigaltstack: support SS_AUTODISARM for CONFIG_COMPAT
Stas Sergeev [Mon, 27 Feb 2017 22:27:25 +0000 (14:27 -0800)]
sigaltstack: support SS_AUTODISARM for CONFIG_COMPAT

Currently SS_AUTODISARM is not supported in compatibility mode, but does
not return -EINVAL either.  This makes dosemu built with -m32 on x86_64
to crash.  Also the kernel's sigaltstack selftest fails if compiled with
-m32.

This patch adds the needed support.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Stas Sergeev <[email protected]>
Cc: Milosz Tanski <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Nicolas Pitre <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Dmitry Safonov <[email protected]>
Cc: Wang Xiaoqiang <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agofs/reiserfs: atomically read inode size
Fabian Frederick [Mon, 27 Feb 2017 22:27:22 +0000 (14:27 -0800)]
fs/reiserfs: atomically read inode size

See i_size_read() comments in include/linux/fs.h

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agohfsplus: atomically read inode size
Fabian Frederick [Mon, 27 Feb 2017 22:27:19 +0000 (14:27 -0800)]
hfsplus: atomically read inode size

See i_size_read() comments in include/linux/fs.h

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoautofs: take more care to not update last_used on path walk
Ian Kent [Mon, 27 Feb 2017 22:27:16 +0000 (14:27 -0800)]
autofs: take more care to not update last_used on path walk

GUI environments seem to be becoming more agressive at scanning
filesystems, to the point where autofs cannot expire mounts at all.

This is one key reason the update of the autofs dentry info last_used
field is done in the expire system when the dentry is seen to be in use.

But somewhere along the way instances of the update has crept back into
the autofs path walk functions which, with the more aggressive file
access patterns, is preventing expiration.

Changing the update in the path walk functions allows autofs to at least
make progress in spite of frequent immediate re-mounts from file
accesses.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ian Kent <[email protected]>
Cc: Tomohiro Kusumi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoautofs: remove duplicated AUTOFS_DEV_IOCTL_SIZE definition
Tomohiro Kusumi [Mon, 27 Feb 2017 22:27:14 +0000 (14:27 -0800)]
autofs: remove duplicated AUTOFS_DEV_IOCTL_SIZE definition

This macro is already defined in uapi header.  Also use this macro where
possible.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Tomohiro Kusumi <[email protected]>
Signed-off-by: Ian Kent <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoautofs: add command enum/macros for root-dir ioctls
Tomohiro Kusumi [Mon, 27 Feb 2017 22:27:11 +0000 (14:27 -0800)]
autofs: add command enum/macros for root-dir ioctls

Sync root-dir ioctl with misc-char-dev ioctl's enum/macro format since
these two types of ioctls aren't completely independent of each other in
terms of command nr.  No functional changes.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Tomohiro Kusumi <[email protected]>
Signed-off-by: Ian Kent <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoautofs: update ioctl documentation regarding struct autofs_dev_ioctl
Tomohiro Kusumi [Mon, 27 Feb 2017 22:27:08 +0000 (14:27 -0800)]
autofs: update ioctl documentation regarding struct autofs_dev_ioctl

This is the same as bf72eda5 except that it's a different file.  Sync
documentation with changes made by 730c9eec in 2009.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Tomohiro Kusumi <[email protected]>
Signed-off-by: Ian Kent <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoautofs: fix wrong ioctl documentation regarding devid
Tomohiro Kusumi [Mon, 27 Feb 2017 22:27:05 +0000 (14:27 -0800)]
autofs: fix wrong ioctl documentation regarding devid

This is the same as d8732841 except that it's a different file.  A
caller has no devid input, and devid is obtained via superblock.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Tomohiro Kusumi <[email protected]>
Signed-off-by: Ian Kent <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoautofs: fix typo in Documentation
Tomohiro Kusumi [Mon, 27 Feb 2017 22:27:02 +0000 (14:27 -0800)]
autofs: fix typo in Documentation

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Tomohiro Kusumi <[email protected]>
Signed-off-by: Ian Kent <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoautofs: remove wrong comment
Tomohiro Kusumi [Mon, 27 Feb 2017 22:26:59 +0000 (14:26 -0800)]
autofs: remove wrong comment

This format seems to have been taken from device mapper header, but
autofs has no such file:function in both kernel and userspace.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Tomohiro Kusumi <[email protected]>
Signed-off-by: Ian Kent <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agokprobes: move kprobe declarations to asm-generic/kprobes.h
Luis R. Rodriguez [Mon, 27 Feb 2017 22:26:56 +0000 (14:26 -0800)]
kprobes: move kprobe declarations to asm-generic/kprobes.h

Often all is needed is these small helpers, instead of compiler.h or a
full kprobes.h.  This is important for asm helpers, in fact even some
asm/kprobes.h make use of these helpers...  instead just keep a generic
asm file with helpers useful for asm code with the least amount of
clutter as possible.

Likewise we need now to also address what to do about this file for both
when architectures have CONFIG_HAVE_KPROBES, and when they do not.  Then
for when architectures have CONFIG_HAVE_KPROBES but have disabled
CONFIG_KPROBES.

Right now most asm/kprobes.h do not have guards against CONFIG_KPROBES,
this means most architecture code cannot include asm/kprobes.h safely.
Correct this and add guards for architectures missing them.
Additionally provide architectures that not have kprobes support with
the default asm-generic solution.  This lets us force asm/kprobes.h on
the header include/linux/kprobes.h always, but most importantly we can
now safely include just asm/kprobes.h on architecture code without
bringing the full kitchen sink of header files.

Two architectures already provided a guard against CONFIG_KPROBES on its
kprobes.h: sh, arch.  The rest of the architectures needed gaurds added.
We avoid including any not-needed headers on asm/kprobes.h unless
kprobes have been enabled.

In a subsequent atomic change we can try now to remove compiler.h from
include/linux/kprobes.h.

During this sweep I've also identified a few architectures defining a
common macro needed for both kprobes and ftrace, that of the definition
of the breakput instruction up.  Some refer to this as
BREAKPOINT_INSTRUCTION.  This must be kept outside of the #ifdef
CONFIG_KPROBES guard.

[[email protected]: fix arm64 build]
Link: http://lkml.kernel.org/r/CAB=NE6X1WMByuARS4mZ1g9+W=LuVBnMDnh_5zyN0CLADaVh=Jw@mail.gmail.com
[[email protected]: fixup for kprobes declarations moving]
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Luis R. Rodriguez <[email protected]>
Signed-off-by: Stephen Rothwell <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Ananth N Mavinakayanahalli <[email protected]>
Cc: Anil S Keshavamurthy <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Steven Rostedt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agozswap: don't param_set_charp while holding spinlock
Dan Streetman [Mon, 27 Feb 2017 22:26:53 +0000 (14:26 -0800)]
zswap: don't param_set_charp while holding spinlock

Change the zpool/compressor param callback function to release the
zswap_pools_lock spinlock before calling param_set_charp, since that
function may sleep when it calls kmalloc with GFP_KERNEL.

While this problem has existed for a while, I wasn't able to trigger it
using a tight loop changing either/both the zpool and compressor params; I
think it's very unlikely to be an issue on the stable kernels, especially
since most zswap users will change the compressor and/or zpool from sysfs
only one time each boot - or zero times, if they add the params to the
kernel boot.

Fixes: c99b42c3529e ("zswap: use charp for zswap param strings")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Dan Streetman <[email protected]>
Reported-by: Sergey Senozhatsky <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agozswap: clear compressor or zpool param if invalid at init
Dan Streetman [Mon, 27 Feb 2017 22:26:50 +0000 (14:26 -0800)]
zswap: clear compressor or zpool param if invalid at init

If either the compressor and/or zpool param are invalid at boot, and
their default value is also invalid, set the param to the empty string
to indicate there is no compressor and/or zpool configured.  This allows
users to check the sysfs interface to see which param needs changing.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Dan Streetman <[email protected]>
Cc: Seth Jennings <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Cc: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agozswap: allow initialization at boot without pool
Dan Streetman [Mon, 27 Feb 2017 22:26:47 +0000 (14:26 -0800)]
zswap: allow initialization at boot without pool

Allow zswap to initialize at boot even if it can't create its pool due
to a failure to create a zpool and/or compressor.  Allow those to be
created later, from the sysfs module param interface.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Dan Streetman <[email protected]>
Cc: Seth Jennings <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Cc: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agomm,fs,dax: mark dax_iomap_pmd_fault as const
Arnd Bergmann [Mon, 27 Feb 2017 22:26:44 +0000 (14:26 -0800)]
mm,fs,dax: mark dax_iomap_pmd_fault as const

The two alternative implementations of dax_iomap_fault have different
prototypes, and one of them is obviously wrong as seen from this build
warning:

  fs/dax.c: In function 'dax_iomap_fault':
  fs/dax.c:1462:35: error: passing argument 2 of 'dax_iomap_pmd_fault' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]

This marks the argument 'const' as in all the related functions.

Fixes: a2d581675d48 ("mm,fs,dax: change ->pmd_fault to ->huge_fault")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
8 years agoMerge tag 'drm-misc-next-fixes-2017-02-27' of git://anongit.freedesktop.org/git/drm...
Dave Airlie [Tue, 28 Feb 2017 02:28:00 +0000 (12:28 +1000)]
Merge tag 'drm-misc-next-fixes-2017-02-27' of git://anongit.freedesktop.org/git/drm-misc into drm-next

Misc fixes for the 4.11 merge window.

- vmwgfx drm_control node compat patch
- rockchip&zte fix
- compat32 support for dma-buf ioctl (cc: stable ofc, since this is a
  massive fumble. oops)

* tag 'drm-misc-next-fixes-2017-02-27' of git://anongit.freedesktop.org/git/drm-misc:
  dma-buf: add support for compat ioctl
  drm/vmwgfx: Work around drm removal of control nodes
  drm/rockchip: cdn-dp: Fix error handling
  drm/rockchip: add extcon dependency for DP
  drm: zte: fix static checker warning on variable 'fmt'

8 years agoide: palm_bk3710: add __initdata to palm_bk3710_port_info
Bhumika Goyal [Fri, 30 Dec 2016 09:20:02 +0000 (14:50 +0530)]
ide: palm_bk3710: add __initdata to palm_bk3710_port_info

The object palm_bk3710_port_info of type ide_port_info is never
referenced anywhere after initialization by palm_bk3710_probe. It is
also passed as a parameter to ide_host_add which is called from the init
function but this call doesn't store the object reference anywhere, and
it only dereferences the values of the fields. Therefore add __initdata
to its declaration.

Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
8 years agonfsd: Fix display of the version string
Trond Myklebust [Wed, 22 Feb 2017 23:35:33 +0000 (18:35 -0500)]
nfsd: Fix display of the version string

The current display code assumes that v4 minor version 0 is tracked by
the call to nfsd_vers(). Now it is tracked by nfsd_minorversion(), and
so we need to adjust the display code.

Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
8 years agonfsd: fix configuration of supported minor versions
Trond Myklebust [Wed, 22 Feb 2017 23:35:32 +0000 (18:35 -0500)]
nfsd: fix configuration of supported minor versions

When the user turns off all minor versions of NFSv4, that should be
equivalent to turning off NFSv4 support, so a mount attempt using NFSv4
should get RPC_PROG_MISMATCH, not NFSERR_MINOR_VERS_MISMATCH.

Allow the user to use either '4.0' or '4' to enable or disable minor
version 0.  Other minor versions are still enabled or disabled using the
'4.x' format.

Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
8 years agof2fs: avoid to issue redundant discard commands
Jaegeuk Kim [Mon, 27 Feb 2017 19:57:11 +0000 (11:57 -0800)]
f2fs: avoid to issue redundant discard commands

If segs_per_sec is over 1 like under SMR, previously f2fs issues discard
commands redundantly on the same section, since we didn't move end position
for the previous discard command.

E.g.,

                       start  end
                         |    |
      prefree_bitmap = [01111100111100]

And, after issue discard for this section,
                             end      start
                              |        |
      prefree_bitmap = [01111100111100]

Select this section again by searching from (end + 1),
                             start  end
                                |   |
      prefree_bitmap = [01111100111100]

Fixes: 36abef4e796d38 ("f2fs: introduce mode=lfs mount option")
Cc: <[email protected]>
Cc: Damien Le Moal <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agoMerge tag 'trace-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
Linus Torvalds [Mon, 27 Feb 2017 21:36:19 +0000 (13:36 -0800)]
Merge tag 'trace-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull another tracing update from Steven Rostedt:
 "Commit 79c6f448c8b79c ("tracing: Fix hwlat kthread migration") fixed a
  bug that was caused by a race condition in initializing the hwlat
  thread. When fixing this code, I realized that it should have been
  done differently. Instead of doing the rewrite and sending that to
  stable, I just sent the above commit to fix the bug that should be
  back ported.

  This commit is on top of the quick fix commit to rewrite the code the
  way it should have been written in the first place"

* tag 'trace-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  tracing: Clean up the hwlat binding code

8 years agoMerge tag 'trace-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
Linus Torvalds [Mon, 27 Feb 2017 21:26:17 +0000 (13:26 -0800)]
Merge tag 'trace-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing updates from Steven Rostedt:
 "This release has no new tracing features, just clean ups, minor fixes
  and small optimizations"

* tag 'trace-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (25 commits)
  tracing: Remove outdated ring buffer comment
  tracing/probes: Fix a warning message to show correct maximum length
  tracing: Fix return value check in trace_benchmark_reg()
  tracing: Use modern function declaration
  jump_label: Reduce the size of struct static_key
  tracing/probe: Show subsystem name in messages
  tracing/hwlat: Update old comment about migration
  timers: Make flags output in the timer_start tracepoint useful
  tracing: Have traceprobe_probes_write() not access userspace unnecessarily
  tracing: Have COMM event filter key be treated as a string
  ftrace: Have set_graph_function handle multiple functions in one write
  ftrace: Do not hold references of ftrace_graph_{notrace_}hash out of graph_lock
  tracing: Reset parser->buffer to allow multiple "puts"
  ftrace: Have set_graph_functions handle write with RDWR
  ftrace: Reset fgd->hash in ftrace_graph_write()
  ftrace: Replace (void *)1 with a meaningful macro name FTRACE_GRAPH_EMPTY
  ftrace: Create a slight optimization on searching the ftrace_hash
  tracing: Add ftrace_hash_key() helper function
  ftrace: Convert graph filter to use hash tables
  ftrace: Expose ftrace_hash_empty and ftrace_lookup_ip
  ...

8 years agof2fs: fix a plint compile warning
Hou Pengyang [Mon, 27 Feb 2017 13:02:59 +0000 (13:02 +0000)]
f2fs: fix a plint compile warning

fix such pclint warning:
...
Loss of precision (arg. no. 2) (unsigned long long to unsigned int))

Signed-off-by: Hou Pengyang <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: add f2fs_drop_inode tracepoint
Hou Pengyang [Mon, 27 Feb 2017 13:02:58 +0000 (13:02 +0000)]
f2fs: add f2fs_drop_inode tracepoint

Signed-off-by: Hou Pengyang <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: Fix zoned block device support
Masato Suzuki [Mon, 27 Feb 2017 11:52:49 +0000 (20:52 +0900)]
f2fs: Fix zoned block device support

The introduction of the multi-device feature partially broke the support
for zoned block devices. In the function f2fs_scan_devices, sbi->devs
allocation and initialization is skipped in the case of a single device
mount. This result in no device information structure being allocated
for the device. This is fine if the device is a regular device, but in
the case of a zoned block device, the device zone type array is not
initialized, which causes the function __f2fs_issue_discard_zone to fail
as get_blkz_type is unable to determine the zone type of a section.

Fix this by always allocating and initializing the sbi->devs device
information array even in the case of a single device if that device is
zoned. For this particular case, make sure to obtain a reference on the
single device so that the call to blkdev_put() in destroy_device_list
operates as expected.

Fixes: 3c62be17d4f562f4 ("f2fs: support multiple devices")
Cc: <[email protected]> # v4.10
Signed-off-by: Masato Suzuki <[email protected]>
Acked-by: Damien Le Moal <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: remove redundant set_page_dirty()
Yunlei He [Mon, 27 Feb 2017 10:59:53 +0000 (18:59 +0800)]
f2fs: remove redundant set_page_dirty()

This patch remove redundant set_page_dirty in truncate_blocks

Signed-off-by: Yunlei He <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: fix to enlarge size of write_io_dummy mempool
Chao Yu [Mon, 27 Feb 2017 10:43:13 +0000 (18:43 +0800)]
f2fs: fix to enlarge size of write_io_dummy mempool

It needs to double cache size of write_io_dummy mempool, otherwise we may
run out of cache in scenraio of Data/Node IOs were issued concurrently.

Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: fix memory leak of write_io_dummy mempool during umount
Chao Yu [Mon, 27 Feb 2017 10:43:12 +0000 (18:43 +0800)]
f2fs: fix memory leak of write_io_dummy mempool during umount

Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: fix to update F2FS_{CP_}WB_DATA count correctly
Chao Yu [Mon, 27 Feb 2017 09:10:45 +0000 (17:10 +0800)]
f2fs: fix to update F2FS_{CP_}WB_DATA count correctly

We should only account F2FS_{CP_}WB_DATA IOs for write path, fix it.

Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: use MAX_FREE_NIDS for the free nids target
Kinglong Mee [Sun, 26 Feb 2017 12:47:16 +0000 (20:47 +0800)]
f2fs: use MAX_FREE_NIDS for the free nids target

F2FS has define MAX_FREE_NIDS for maximum of cached free nids target.

Signed-off-by: Kinglong Mee <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: introduce free nid bitmap
Chao Yu [Thu, 23 Feb 2017 02:53:49 +0000 (10:53 +0800)]
f2fs: introduce free nid bitmap

In scenario of intensively node allocation, free nids will be ran out
soon, then it needs to stop to load free nids by traversing NAT blocks,
in worse case, if NAT blocks does not be cached in memory, it generates
IOs which slows down our foreground operations.

In order to speed up node allocation, in this patch we introduce a new
free_nid_bitmap array, so there is an bitmap table for each NAT block,
Once the NAT block is loaded, related bitmap cache will be switched on,
and bitmap will be set during traversing nat entries in NAT block, later
we can query and update nid usage status in memory completely.

With such implementation, I expect performance of node allocation can be
improved in the long-term after filesystem image is mounted.

Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: new helper cur_cp_crc() getting crc in f2fs_checkpoint
Kinglong Mee [Sat, 25 Feb 2017 11:53:39 +0000 (19:53 +0800)]
f2fs: new helper cur_cp_crc() getting crc in f2fs_checkpoint

There are four places that getting the crc value in f2fs_checkpoint,
just add a new helper cur_cp_crc for them.

Signed-off-by: Kinglong Mee <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: update the comment of default nr_pages to skipping
Kinglong Mee [Sat, 25 Feb 2017 11:32:21 +0000 (19:32 +0800)]
f2fs: update the comment of default nr_pages to skipping

Fixes: 2c237ebaa4 ("f2fs: avoid writing node/metapages during writes")
Signed-off-by: Kinglong Mee <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: drop the duplicate pval in f2fs_getxattr
Kinglong Mee [Sat, 25 Feb 2017 11:23:40 +0000 (19:23 +0800)]
f2fs: drop the duplicate pval in f2fs_getxattr

Fixes: ba38c27eb9 ("f2fs: enhance lookup xattr")
Signed-off-by: Kinglong Mee <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: Don't update the xattr data that same as the exist
Kinglong Mee [Sat, 25 Feb 2017 11:23:27 +0000 (19:23 +0800)]
f2fs: Don't update the xattr data that same as the exist

f2fs removes the old xattr data and appends the new data although
the new data is same as the exist.

Signed-off-by: Kinglong Mee <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: kill __is_extent_same
Chao Yu [Sat, 25 Feb 2017 09:29:54 +0000 (17:29 +0800)]
f2fs: kill __is_extent_same

Since commit ee6d182f2a19 ("f2fs: remove syncing inode page in all the
cases") delayed inode element updating from inode cache to node page
cache, so once largest cached extent is updated, we can make inode dirty
immediately instead of checking and updating it in the end of extent
cache update.

The above commit didn't clean up unneeded codes in extent_cache.c, let's
finish the job in this patch.

Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: avoid bggc->fggc when enough free segments are avaliable after cp
Hou Pengyang [Sat, 25 Feb 2017 03:57:38 +0000 (03:57 +0000)]
f2fs: avoid bggc->fggc when enough free segments are avaliable after cp

We use has_not_enough_free_secs to check if there are enough free segments,

     (free_sections(sbi) + freed) <=
        (node_secs + 2 * dent_secs + imeta_secs +
         reserved_sections(sbi) + needed);

Under scenario with large number of dirty nodes, these nodes would be flushed
during cp, as a result, right side of the inequality would be decreased, while
left side stays unchanged if these nodes are flushed in SSR way, which means
there are enough free segments after this cp.

For this case, we just do a bggc instead of fggc.

Signed-off-by: Hou Pengyang <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: select target segment with closer temperature in SSR mode
Chao Yu [Fri, 24 Feb 2017 10:46:00 +0000 (18:46 +0800)]
f2fs: select target segment with closer temperature in SSR mode

In SSR mode, we can allocate target segment which has different
temperature type from the type of current block, in order to avoid
mixing coldest and hottest data/node as much as possible, change
SSR allocation policy to select closer temperature for current
block prior.

Signed-off-by: Yunlong Song <[email protected]>
Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: show simple call stack in fault injection message
Chao Yu [Sat, 25 Feb 2017 03:08:28 +0000 (11:08 +0800)]
f2fs: show simple call stack in fault injection message

Previously kernel message can show that in which function we do the
injection, but unfortunately, most of the caller are the same, for
tracking more information of injection path, it needs to show upper
caller's name. This patch supports that ability.

Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: no need lock_op in f2fs_write_inline_data
Yunlei He [Thu, 23 Feb 2017 12:31:20 +0000 (20:31 +0800)]
f2fs: no need lock_op in f2fs_write_inline_data

Similar as f2fs_write_inode, f2fs_write_inline_data just
mark inode page dirty, so it's no need to write inline data
under read lock of cp_rwsem.

Signed-off-by: Yunlei He <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: add bitmaps for empty or full NAT blocks
Jaegeuk Kim [Thu, 9 Feb 2017 18:38:09 +0000 (10:38 -0800)]
f2fs: add bitmaps for empty or full NAT blocks

This patches adds bitmaps to represent empty or full NAT blocks containing
free nid entries.

If we can find valid crc|cp_ver in the last block of checkpoint pack, we'll
use these bitmaps when building free nids. In order to avoid checkpointing
burden, up-to-date bitmaps will be flushed only during umount time. So,
normally we can get this gain, but when power-cut happens, we rely on fsck.f2fs
which recovers this bitmap again.

After this patch, we build free nids from nid #0 at mount time to make more
full NAT blocks, but in runtime, we check empty NAT blocks to load free nids
without loading any NAT pages from disk.

Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: replace rw semaphore extent_tree_lock with mutex lock
Yunlei He [Thu, 23 Feb 2017 11:39:59 +0000 (19:39 +0800)]
f2fs: replace rw semaphore extent_tree_lock with mutex lock

This patch replace rw semaphore extent_tree_lock with mutex lock
for no read cases with this lock.

Signed-off-by: Yunlei He <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: avoid m_flags overlay when allocating more data blocks
Kinglong Mee [Thu, 23 Feb 2017 11:55:05 +0000 (19:55 +0800)]
f2fs: avoid m_flags overlay when allocating more data blocks

When more than one data blocks are allocated, the F2FS_MAP_UNWRITTEN/MAPPED
flags will be overlapped by F2FS_MAP_NEW at the later times.

Signed-off-by: Kinglong Mee <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: remove unsafe bitmap checking
Hou Pengyang [Thu, 23 Feb 2017 09:18:06 +0000 (09:18 +0000)]
f2fs: remove unsafe bitmap checking

proc A:                      proc B:
- writeback_sb_inodes
- __writeback_single_inode
- do_writepages
- f2fs_write_node_pages
- f2fs_balance_fs_bg         - write_checkpoint
- build_free_nids            - flush_nat_entries
- __build_free_nids          - __flush_nat_entry_set
- ra_meta_pages              - get_next_nat_page
- current_nat_addr           - set_to_next_nat
[do nat_bitmap checking]     - f2fs_change_bit

For proc A, nat_bitmap and nat_bitmap_mir would be compared without lock_op and
nm_i->nat_tree_lock, while proc B is changing nat_bitmap/nat_bitmap_ver in cp.

So it is normal for nat_bitmap/nat_bitmap diffrence under such scenario.

This patch fix this by removing the monitoring point.

[Fix: 599a09b f2fs: check in-memory nat version bitmap]
Signed-off-by: Hou Pengyang <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: init local extent_info to avoid stale stack info in tp
Hou Pengyang [Thu, 23 Feb 2017 09:18:05 +0000 (09:18 +0000)]
f2fs: init local extent_info to avoid stale stack info in tp

To avoid such stale(fops, blk, len) info in f2fs_lookup_extent_tree_end tp

dio-23095 [005] ...1 17878.856859: f2fs_lookup_extent_tree_end:
dev = (259,30), ino = 856, pgofs = 0,
ext_info(fofs: 3441207040, blk: 4294967232, len: 3481143808)

Signed-off-by: Hou Pengyang <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: remove unnecessary condition check for write_checkpoint in f2fs_gc
Yunlong Song [Tue, 21 Feb 2017 12:43:48 +0000 (20:43 +0800)]
f2fs: remove unnecessary condition check for write_checkpoint in f2fs_gc

Since has_not_enough_free_secs(sbi, 0, 0) must be true if has_not_enough_
free_secs(sbi, sec_freed, 0) is true, write_checkpoint is sure to execute in
both conditions.

Signed-off-by: Yunlong Song <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
8 years agof2fs: check discard alignment only for SEQWRITE zones
Jaegeuk Kim [Thu, 23 Feb 2017 04:18:35 +0000 (20:18 -0800)]
f2fs: check discard alignment only for SEQWRITE zones

For converntional zones, we don't need to align discard commands to exact zone
size.

Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
This page took 0.11947 seconds and 4 git commands to generate.