From 7871c012ce649c97a0dd121364dd82b2e545cfb5 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Thu, 16 Aug 2012 15:59:21 +0800 Subject: [PATCH] LU-1756 kernel: cleanup lustre_compat25.h 1. unused functions: KIOBUF_GET_BLOCKS() 2. container_of() always defined 3. place linux/mpage.h at where it is needed Signed-off-by: Peng Tao Change-Id: I3369572fbd8aef2a5ad4881ec3f0f67c11772881 Reviewed-on: http://review.whamcloud.com/3687 Tested-by: Hudson Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Liu Xuezhao --- lustre/include/linux/lustre_compat25.h | 14 -------------- lustre/llite/rw26.c | 1 + 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index a0cdf31..e5d6622 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -146,12 +146,6 @@ static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt, #define ll_dentry_open(a, b, c, d) dentry_open(a, b, c) #endif -#ifdef HAVE_KIOBUF_KIO_BLOCKS -#define KIOBUF_GET_BLOCKS(k) ((k)->kio_blocks) -#else -#define KIOBUF_GET_BLOCKS(k) ((k)->blocks) -#endif - #ifdef HAVE_SECURITY_PLUG #define ll_vfs_symlink(dir, dentry, mnt, path, mode) \ vfs_symlink(dir, dentry, mnt, path, mode) @@ -166,12 +160,6 @@ static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt, #endif -#ifndef container_of -#define container_of(ptr, type, member) ({ \ - const typeof( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) -#endif - #ifdef HAVE_INODE_DIO_WAIT /* inode_dio_wait(i) use as-is for write lock */ # define inode_dio_write_done(i) do {} while (0) /* for write unlock */ @@ -184,8 +172,6 @@ static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt, # define inode_dio_done(i) up_read(&(i)->i_alloc_sem) #endif -#include /* for generic_writepages */ - #ifdef HAVE_HIDE_VFSMOUNT_GUTS # include <../fs/mount.h> #else diff --git a/lustre/llite/rw26.c b/lustre/llite/rw26.c index a621064..ee12198 100644 --- a/lustre/llite/rw26.c +++ b/lustre/llite/rw26.c @@ -53,6 +53,7 @@ #endif #include #include +#include #include #include #include -- 1.8.3.1