summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/include
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-05-21 14:35:13 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-25 18:29:10 +0200
commitfa399093620b867afe7686be47f197c8f17908c5 (patch)
tree05e05cd907727e840832e20ec76b5bdb2cd51c7c /drivers/staging/lustre/include
parent525609ed58e7c743987ed6bba228da02392ca090 (diff)
downloadop-kernel-dev-fa399093620b867afe7686be47f197c8f17908c5.zip
op-kernel-dev-fa399093620b867afe7686be47f197c8f17908c5.tar.gz
staging: lustre: replace memory_presure funcitons by standard interfaces.
Use memalloc_noreclaim_save() and memalloc_noreclaim_restore(), and for testing, just directly test the flag in current->flags Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/include')
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
index d4c5965..2b0dafb 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
@@ -48,35 +48,4 @@
#define NUM_CACHEPAGES totalram_pages
#endif
-static inline unsigned int memory_pressure_get(void)
-{
- return current->flags & PF_MEMALLOC;
-}
-
-static inline void memory_pressure_set(void)
-{
- current->flags |= PF_MEMALLOC;
-}
-
-static inline void memory_pressure_clr(void)
-{
- current->flags &= ~PF_MEMALLOC;
-}
-
-static inline int cfs_memory_pressure_get_and_set(void)
-{
- int old = memory_pressure_get();
-
- if (!old)
- memory_pressure_set();
- return old;
-}
-
-static inline void cfs_memory_pressure_restore(int old)
-{
- if (old)
- memory_pressure_set();
- else
- memory_pressure_clr();
-}
#endif
OpenPOWER on IntegriCloud