summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_priv.h
diff options
context:
space:
mode:
authorVlastimil Babka2016-07-29 00:49:13 +0200
committerLinus Torvalds2016-07-29 01:07:41 +0200
commit31a6c1909f51dbe9bf08eb40dc64e3db90cf6f79 (patch)
tree7adc87cfa64bdd01e308be5dfc2e7b65f84a17db /drivers/scsi/scsi_priv.h
parentlib/stackdepot.c: use __GFP_NOWARN for stack allocations (diff)
downloadkernel-qcow2-linux-31a6c1909f51dbe9bf08eb40dc64e3db90cf6f79.tar.gz
kernel-qcow2-linux-31a6c1909f51dbe9bf08eb40dc64e3db90cf6f79.tar.xz
kernel-qcow2-linux-31a6c1909f51dbe9bf08eb40dc64e3db90cf6f79.zip
mm, page_alloc: set alloc_flags only once in slowpath
In __alloc_pages_slowpath(), alloc_flags doesn't change after it's initialized, so move the initialization above the retry: label. Also make the comment above the initialization more descriptive. The only exception in the alloc_flags being constant is ALLOC_NO_WATERMARKS, which may change due to TIF_MEMDIE being set on the allocating thread. We can fix this, and make the code simpler and a bit more effective at the same time, by moving the part that determines ALLOC_NO_WATERMARKS from gfp_to_alloc_flags() to gfp_pfmemalloc_allowed(). This means we don't have to mask out ALLOC_NO_WATERMARKS in numerous places in __alloc_pages_slowpath() anymore. The only two tests for the flag can instead call gfp_pfmemalloc_allowed(). Link: http://lkml.kernel.org/r/20160721073614.24395-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/scsi/scsi_priv.h')
0 files changed, 0 insertions, 0 deletions