VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Ben Widawsky <ben.widawsky@intel.com> 2021-09-02 15:00:16 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-09-03 09:58:17 -0700 commit: a38a59fdfa10be55d08e4530923d950e739ac6a2 parent: cfcaa66f803233c50e17239469f6c96136a673a1
Commit Summary:
mm/mempolicy: advertise new MPOL_PREFERRED_MANY
Diffstat:
1 file changed, 1 insertion, 6 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 64be3565ab7f..9e58854d7929 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1463,12 +1463,7 @@ static inline int sanitize_mpol_flags(int *mode, unsigned short *flags)
 	*flags = *mode & MPOL_MODE_FLAGS;
 	*mode &= ~MPOL_MODE_FLAGS;
 
-	/*
-	 * The check should be 'mode >= MPOL_MAX', but as 'prefer_many'
-	 * is not fully implemented, don't permit it to be used for now,
-	 * and the logic will be restored in following patch
-	 */
-	if ((unsigned int)(*mode) >=  MPOL_PREFERRED_MANY)
+	if ((unsigned int)(*mode) >=  MPOL_MAX)
 		return -EINVAL;
 	if ((*flags & MPOL_F_STATIC_NODES) && (*flags & MPOL_F_RELATIVE_NODES))
 		return -EINVAL;