]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mm: save two stranded bits in gfp_mask
authorShakeel Butt <shakeelb@google.com>
Fri, 8 Jun 2018 00:08:11 +0000 (17:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Jun 2018 00:34:36 +0000 (17:34 -0700)
___GFP_COLD and ___GFP_OTHER_NODE were removed but their bits were
stranded.  Fill the gaps by moving the existing gfp masks around.

Link: http://lkml.kernel.org/r/20180516211439.177440-1-shakeelb@google.com
Signed-off-by: Shakeel Butt <shakeelb@google.com>
Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Thelen <gthelen@google.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/gfp.h

index fc5ab85278d5fb2ff1f32c1f66b1aca1befc21a0..7f860ea29ec684c155329dac6a90a0b417f01428 100644 (file)
@@ -24,6 +24,7 @@ struct vm_area_struct;
 #define ___GFP_HIGH            0x20u
 #define ___GFP_IO              0x40u
 #define ___GFP_FS              0x80u
+#define ___GFP_WRITE           0x100u
 #define ___GFP_NOWARN          0x200u
 #define ___GFP_RETRY_MAYFAIL   0x400u
 #define ___GFP_NOFAIL          0x800u
@@ -36,11 +37,10 @@ struct vm_area_struct;
 #define ___GFP_THISNODE                0x40000u
 #define ___GFP_ATOMIC          0x80000u
 #define ___GFP_ACCOUNT         0x100000u
-#define ___GFP_DIRECT_RECLAIM  0x400000u
-#define ___GFP_WRITE           0x800000u
-#define ___GFP_KSWAPD_RECLAIM  0x1000000u
+#define ___GFP_DIRECT_RECLAIM  0x200000u
+#define ___GFP_KSWAPD_RECLAIM  0x400000u
 #ifdef CONFIG_LOCKDEP
-#define ___GFP_NOLOCKDEP       0x2000000u
+#define ___GFP_NOLOCKDEP       0x800000u
 #else
 #define ___GFP_NOLOCKDEP       0
 #endif
@@ -205,7 +205,7 @@ struct vm_area_struct;
 #define __GFP_NOLOCKDEP ((__force gfp_t)___GFP_NOLOCKDEP)
 
 /* Room for N __GFP_FOO bits */
-#define __GFP_BITS_SHIFT (25 + IS_ENABLED(CONFIG_LOCKDEP))
+#define __GFP_BITS_SHIFT (23 + IS_ENABLED(CONFIG_LOCKDEP))
 #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1))
 
 /*