[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231122211200.31620-10-gregory.price@memverge.com>
Date: Wed, 22 Nov 2023 16:11:58 -0500
From: Gregory Price <gourry.memverge@...il.com>
To: linux-mm@...ck.org
Cc: linux-doc@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-api@...r.kernel.org, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
arnd@...db.de, tglx@...utronix.de, luto@...nel.org,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
x86@...nel.org, hpa@...or.com, mhocko@...nel.org, tj@...nel.org,
ying.huang@...el.com, Gregory Price <gregory.price@...verge.com>
Subject: [RFC PATCH 09/11] mm/mempolicy: build mpol_parse_str unconditionally
mpol_parse_str is conditioned on CONFIG_TMPFS. We intend to reuse
this interface for procfs/mempolicy, so build unconditionally.
Signed-off-by: Gregory Price <gregory.price@...verge.com>
---
include/linux/mempolicy.h | 4 ----
mm/mempolicy.c | 2 --
2 files changed, 6 deletions(-)
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index b951e96a53ce..1adbcc10f291 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -158,9 +158,7 @@ int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from,
const nodemask_t *to, int flags);
-#ifdef CONFIG_TMPFS
extern int mpol_parse_str(char *str, struct mempolicy **mpol);
-#endif
extern void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol);
@@ -276,12 +274,10 @@ static inline void check_highest_zone(int k)
{
}
-#ifdef CONFIG_TMPFS
static inline int mpol_parse_str(char *str, struct mempolicy **mpol)
{
return 1; /* error */
}
-#endif
static inline int mpol_misplaced(struct folio *folio,
struct vm_area_struct *vma,
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index e0c9127571dd..a418af0a1359 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -3115,7 +3115,6 @@ static const char * const policy_modes[] =
[MPOL_PREFERRED_MANY] = "prefer (many)",
};
-#ifdef CONFIG_TMPFS
/**
* mpol_parse_str - parse string to mempolicy, for tmpfs mpol mount option.
* @str: string containing mempolicy to parse
@@ -3248,7 +3247,6 @@ int mpol_parse_str(char *str, struct mempolicy **mpol)
*mpol = new;
return err;
}
-#endif /* CONFIG_TMPFS */
/**
* mpol_to_str - format a mempolicy structure for printing
--
2.39.1
Powered by blists - more mailing lists