diff options
author | James Simmons <jsimmons@infradead.org> | 2016-03-31 17:18:39 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-31 23:04:45 +0300 |
commit | 5c89dc06eb45bebe4dcc59205ac0ed3fe3c44c34 (patch) | |
tree | 394777fddc20c4d9b850543b602cea31b10035a6 | |
parent | e3e30e10c5d72844f020fe42e62066e9fd1b051c (diff) | |
download | linux-5c89dc06eb45bebe4dcc59205ac0ed3fe3c44c34.tar.xz |
staging: lustre: libcfs: move NUM_CACHEPAGES to libcfs_prim.h
We don't really need linux specific headers anymore so move
NUM_CACHEPAGES macro to libcfs_prim.h.
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/13841
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h | 8 | ||||
-rw-r--r-- | drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h index d97060b8be74..6f7a276b87b7 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h @@ -43,6 +43,14 @@ /* * Memory */ +#if BITS_PER_LONG == 32 +/* limit to lowmem on 32-bit systems */ +#define NUM_CACHEPAGES \ + min(totalram_pages, 1UL << (30 - PAGE_CACHE_SHIFT) * 3 / 4) +#else +#define NUM_CACHEPAGES totalram_pages +#endif + static inline unsigned int memory_pressure_get(void) { return current->flags & PF_MEMALLOC; diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h index c4b428478c73..9285fefcdf79 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h @@ -57,12 +57,4 @@ #include "../libcfs_cpu.h" #endif -#if BITS_PER_LONG == 32 -/* limit to lowmem on 32-bit systems */ -#define NUM_CACHEPAGES \ - min(totalram_pages, 1UL << (30 - PAGE_CACHE_SHIFT) * 3 / 4) -#else -#define NUM_CACHEPAGES totalram_pages -#endif - #endif /* __LINUX_CFS_MEM_H__ */ |