The file_inode() defined in libcfs will collide with the
same defination in compat-2.6.h from the OFED/Mellanox
stack. The easiest way to avoid this is move the file_inode
wrapper from libcfs linux-fs.h header to lustre_compat.h.
The header lustre_compat.h is only used in the lustre
layer so it wouldn't collide with compat-2.6.h.
Change-Id: I70502be0d824a2a1f9c538ae894ab8183961349b
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/21082
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: Chris Horn <hornc@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
}
#endif
-#ifndef HAVE_FILE_INODE
-static inline struct inode *file_inode(const struct file *file)
-{
- return file->f_path.dentry->d_inode;
-}
-#endif
-
#if defined(HAVE_FILE_FSYNC_4ARGS) || defined(HAVE_FILE_FSYNC_2ARGS)
#define ll_vfs_fsync_range(fp, start, end, datasync) \
vfs_fsync_range(fp, start, end, datasync)
# define set_file_inode(file, inode)
#endif
+#ifndef HAVE_FILE_INODE
+static inline struct inode *file_inode(const struct file *file)
+{
+ return file->f_path.dentry->d_inode;
+}
+#endif
+
#ifdef HAVE_OLDSIZE_TRUNCATE_PAGECACHE
#define ll_truncate_pagecache(inode, size) truncate_pagecache(inode, 0, size)
#else