From: Peng Tao <bergwolf@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Andreas Dilger <andreas.dilger@intel.com>,
linux-next@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Glauber Costa <glommer@openvz.org>, Peng Tao <bergwolf@gmail.com>,
Peng Tao <tao.peng@emc.com>
Subject: [PATCH 4/5] staging/lustre/libcfs: cleanup linux-mem.h
Date: Fri, 7 Jun 2013 20:53:45 +0800 [thread overview]
Message-ID: <1370609626-3734-5-git-send-email-bergwolf@gmail.com> (raw)
In-Reply-To: <1370609626-3734-1-git-send-email-bergwolf@gmail.com>
remove shrinker related wrappers.
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
---
.../lustre/include/linux/libcfs/linux/linux-mem.h | 38 --------------------
1 file changed, 38 deletions(-)
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 042a2bc..c572611 100644
--- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h
+++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h
@@ -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__ */
--
1.7.9.5
next prev parent reply other threads:[~2013-06-07 12:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-07 12:53 [PATCH 0/5] staging/lustre: fix build in linux-next/akpm tree Peng Tao
2013-06-07 12:53 ` [PATCH 1/5] staging/lustre/ldlm: convert to shrinkers to count/scan API Peng Tao
2013-06-07 12:53 ` [PATCH 2/5] staging/lustre/obdclass: convert lu_object shrinker " Peng Tao
2013-06-07 12:53 ` [PATCH 3/5] staging/lustre/ptlrpc: convert to new shrinker API Peng Tao
2013-06-07 12:53 ` Peng Tao [this message]
2013-06-07 12:53 ` [PATCH 5/5] staging/lustre: replace num_physpages with totalram_pages Peng Tao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1370609626-3734-5-git-send-email-bergwolf@gmail.com \
--to=bergwolf@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andreas.dilger@intel.com \
--cc=glommer@openvz.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=tao.peng@emc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox