]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging/lustre/libcfs: cleanup linux-mem.h
authorPeng Tao <bergwolf@gmail.com>
Thu, 27 Jun 2013 23:54:26 +0000 (09:54 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:39:16 +0000 (16:39 +1000)
remove shrinker related wrappers.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h

index 042a2bc432be5698133458b643dadc52faa74ac8..c5726115cbeb19c83105fb1210cb22f804f42471 100644 (file)
        do { __oldfs = get_fs(); set_fs(get_ds());} while(0)
 #define MMSPACE_CLOSE         set_fs(__oldfs)
 
-/*
- * Shrinker
- */
-
-# define SHRINKER_ARGS(sc, nr_to_scan, gfp_mask)  \
-                      struct shrinker *shrinker, \
-                      struct shrink_control *sc
-# define shrink_param(sc, var) ((sc)->var)
-
-typedef int (*shrinker_t)(SHRINKER_ARGS(sc, nr_to_scan, gfp_mask));
-
-static inline
-struct shrinker *set_shrinker(int seek, shrinker_t func)
-{
-       struct shrinker *s;
-
-       s = kmalloc(sizeof(*s), GFP_KERNEL);
-       if (s == NULL)
-               return (NULL);
-
-       s->shrink = func;
-       s->seeks = seek;
-
-       register_shrinker(s);
-
-       return s;
-}
-
-static inline
-void remove_shrinker(struct shrinker *shrinker)
-{
-       if (shrinker == NULL)
-               return;
-
-       unregister_shrinker(shrinker);
-       kfree(shrinker);
-}
-
 #endif /* __LINUX_CFS_MEM_H__ */