From: Peng Tao <bergwolf@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Peng Tao <bergwolf@gmail.com>, Peng Tao <tao.peng@emc.com>,
Andreas Dilger <andreas.dilger@intel.com>,
Michal Hocko <mhocko@suse.cz>, Dave Chinner <dchinner@redhat.com>
Subject: [PATCH-V2-RESEND 4/4] staging/lustre/libcfs: cleanup linux-mem.h
Date: Thu, 25 Jul 2013 01:26:32 +0800 [thread overview]
Message-ID: <1374686792-3428-5-git-send-email-bergwolf@gmail.com> (raw)
In-Reply-To: <1374686792-3428-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>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
.../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 63efb7b..2af15d4 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
prev parent reply other threads:[~2013-07-24 17:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-24 17:26 [PATCH-V2-RESEND 0/4] staging/lustre: convert to new shrinker API Peng Tao
2013-07-24 17:26 ` [PATCH-V2-RESEND 1/4] staging/lustre/ldlm: convert to shrinkers to count/scan API Peng Tao
2013-07-24 17:26 ` [PATCH-V2-RESEND 2/4] staging/lustre/obdclass: convert lu_object shrinker " Peng Tao
2013-07-24 17:26 ` [PATCH-V2-RESEND 3/4] staging/lustre/ptlrpc: convert to new shrinker API Peng Tao
2013-07-24 17:26 ` Peng Tao [this message]
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=1374686792-3428-5-git-send-email-bergwolf@gmail.com \
--to=bergwolf@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andreas.dilger@intel.com \
--cc=dchinner@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.cz \
--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
Powered by JetHome