Whamcloud - gitweb
LU-1756 kernel: cleanup lustre_compat25.h
authorPeng Tao <tao.peng@emc.com>
Thu, 16 Aug 2012 07:59:21 +0000 (15:59 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 17 Dec 2012 05:44:34 +0000 (00:44 -0500)
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 <tao.peng@emc.com>
Change-Id: I3369572fbd8aef2a5ad4881ec3f0f67c11772881
Reviewed-on: http://review.whamcloud.com/3687
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
lustre/include/linux/lustre_compat25.h
lustre/llite/rw26.c

index a0cdf31..e5d6622 100644 (file)
@@ -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 <linux/mpage.h>        /* for generic_writepages */
-
 #ifdef HAVE_HIDE_VFSMOUNT_GUTS
 # include <../fs/mount.h>
 #else
index a621064..ee12198 100644 (file)
@@ -53,6 +53,7 @@
 #endif
 #include <linux/fs.h>
 #include <linux/buffer_head.h>
+#include <linux/mpage.h>
 #include <linux/writeback.h>
 #include <linux/stat.h>
 #include <asm/uaccess.h>