Skip to content

Commit

Permalink
staging/lustre/libcfs: cleanup linux-mem.h
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Peng Tao authored and Al Viro committed Sep 10, 2013
1 parent 3bb22ec commit ea8352c
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,42 +79,4 @@
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__ */

0 comments on commit ea8352c

Please sign in to comment.