Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753086Ab3GXRbh (ORCPT ); Wed, 24 Jul 2013 13:31:37 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:55151 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753001Ab3GXRbd (ORCPT ); Wed, 24 Jul 2013 13:31:33 -0400 From: Peng Tao To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Peng Tao , Peng Tao , Andreas Dilger , Michal Hocko , Dave Chinner Subject: [PATCH-V2-RESEND 4/4] staging/lustre/libcfs: cleanup linux-mem.h Date: Thu, 25 Jul 2013 01:26:32 +0800 Message-Id: <1374686792-3428-5-git-send-email-bergwolf@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1374686792-3428-1-git-send-email-bergwolf@gmail.com> References: <1374686792-3428-1-git-send-email-bergwolf@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1792 Lines: 66 remove shrinker related wrappers. Signed-off-by: Peng Tao Signed-off-by: Andreas Dilger Cc: Michal Hocko Cc: Dave Chinner Signed-off-by: Andrew Morton --- .../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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/