 SLES10 still has the u.generic_ip pointer for attaching private data to
 struct inode. This patch adds a check.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 Config.make.in     |    1 +
 configure.in       |    5 +++++
 fs/ocfs2/Makefile  |    4 ++++
 fs/ocfs2/dlmglue.c |    4 ++++
 4 files changed, 14 insertions(+)

--- a/Config.make.in	2008-02-02 10:36:26.000000000 -0500
+++ b/Config.make.in	2008-02-02 10:36:27.000000000 -0500
@@ -84,6 +84,7 @@ NO_MANDATORY_LOCK = @NO_MANDATORY_LOCK@
 WRITEBACK_CONTROL_NO_RANGE_PREFIX = @WRITEBACK_CONTROL_NO_RANGE_PREFIX@
 NO_SYNC_FILE_FLAGS = @NO_SYNC_FILE_FLAGS@
 NO_BLKCNT_T = @NO_BLKCNT_T@
+NO_I_PRIVATE = @NO_I_PRIVATE@
 
 OCFS_DEBUG = @OCFS_DEBUG@
 
--- a/configure.in	2008-02-02 10:36:26.000000000 -0500
+++ b/configure.in	2008-02-02 10:36:27.000000000 -0500
@@ -361,6 +361,11 @@ OCFS2_CHECK_KERNEL([blkcnt_t in types.h]
 AC_SUBST(NO_BLKCNT_T)
 KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS blkcnt_t.h"
 
+NO_I_PRIVATE=
+OCFS2_CHECK_KERNEL([i_private in struct inode], fs.h,
+  , NO_I_PRIVATE=yes, [^	void.*\*i_private;])
+AC_SUBST(NO_I_PRIVATE)
+
 # using -include has two advantages:
 #  the source doesn't need to know to include compat headers
 #  the compat header file names don't go through the search path
--- a/fs/ocfs2/Makefile	2008-02-02 10:36:26.000000000 -0500
+++ b/fs/ocfs2/Makefile	2008-02-02 10:36:27.000000000 -0500
@@ -128,6 +128,10 @@ ifdef NO_BLKCNT_T
 EXTRA_CFLAGS += -DNO_BLKCNT_T
 endif
 
+ifdef NO_I_PRIVATE
+EXTRA_CFLAGS += -DNO_I_PRIVATE
+endif
+
 #
 # Since SUBDIRS means something to kbuild, define them safely.  Do not
 # include trailing slashes.
--- a/fs/ocfs2/dlmglue.c	2008-02-02 10:22:53.000000000 -0500
+++ b/fs/ocfs2/dlmglue.c	2008-02-02 10:36:27.000000000 -0500
@@ -2414,7 +2414,11 @@ static int ocfs2_dlm_debug_open(struct i
 		mlog_errno(ret);
 		goto out;
 	}
+#ifndef NO_I_PRIVATE
 	osb = inode->i_private;
+#else
+	osb = inode->u.generic_ip;
+#endif
 	ocfs2_get_dlm_debug(osb->osb_dlm_debug);
 	priv->p_dlm_debug = osb->osb_dlm_debug;
 	INIT_LIST_HEAD(&priv->p_iter_res.l_debug_list);



