summaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorSteven Rostedt (VMware)2017-02-24 23:59:10 +0100
committerLinus Torvalds2017-02-25 02:46:56 +0100
commit3f472cc978ea019c7b09cc03f90b8ed6034efdf8 (patch)
tree7744f418e1d89fc85deb14e6613b9a201dcaeba8 /mm/memory.c
parentmm, vmscan: clear PGDAT_WRITEBACK when zone is balanced (diff)
downloadkernel-qcow2-linux-3f472cc978ea019c7b09cc03f90b8ed6034efdf8.tar.gz
kernel-qcow2-linux-3f472cc978ea019c7b09cc03f90b8ed6034efdf8.tar.xz
kernel-qcow2-linux-3f472cc978ea019c7b09cc03f90b8ed6034efdf8.zip
mm/shmem.c: fix unlikely() test of info->seals to test only for WRITE and GROW
Running my likely/unlikely profiler, I discovered that the test in shmem_write_begin() that tests for info->seals as unlikely, is always incorrect. This is because shmem_get_inode() sets info->seals to have F_SEAL_SEAL set by default, and it is unlikely to be cleared when shmem_write_begin() is called. Thus, the if statement is very likely. But as the if statement block only cares about F_SEAL_WRITE and F_SEAL_GROW, change the test to only test those two bits. Link: http://lkml.kernel.org/r/20170203105656.7aec6237@gandalf.local.home Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Acked-by: Hugh Dickins <hughd@google.com> Cc: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
0 files changed, 0 insertions, 0 deletions