SLES10 doesn't have ->page_mkwrite. This patch adds a check.
Signed-off-by: Jeff Mahoney <[EMAIL PROTECTED]>
---
Config.make.in | 1 +
configure.in | 5 +++++
fs/ocfs2/Makefile | 4 ++++
fs/ocfs2/mmap.c | 4 ++++
4 files changed, 14 insertions(+)
--- a/Config.make.in 2008-02-02 10:36:27.000000000 -0500
+++ b/Config.make.in 2008-02-02 10:36:28.000000000 -0500
@@ -85,6 +85,7 @@ WRITEBACK_CONTROL_NO_RANGE_PREFIX = @WRI
NO_SYNC_FILE_FLAGS = @NO_SYNC_FILE_FLAGS@
NO_BLKCNT_T = @NO_BLKCNT_T@
NO_I_PRIVATE = @NO_I_PRIVATE@
+NO_PAGE_MKWRITE = @NO_PAGE_MKWRITE@
OCFS_DEBUG = @OCFS_DEBUG@
--- a/configure.in 2008-02-02 10:36:27.000000000 -0500
+++ b/configure.in 2008-02-02 10:36:28.000000000 -0500
@@ -366,6 +366,11 @@ OCFS2_CHECK_KERNEL([i_private in struct
, NO_I_PRIVATE=yes, [^ void.*\*i_private;])
AC_SUBST(NO_I_PRIVATE)
+NO_PAGE_MKWRITE=
+OCFS2_CHECK_KERNEL([page_mkwrite in struct vm_operations_struct], mm.h,
+ , NO_PAGE_MKWRITE=yes, [^ int (\*page_mkwrite)(struct vm_area_struct
\*vma, struct page \*page);])
+AC_SUBST(NO_PAGE_MKWRITE)
+
# 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:27.000000000 -0500
+++ b/fs/ocfs2/Makefile 2008-02-02 10:36:28.000000000 -0500
@@ -132,6 +132,10 @@ ifdef NO_I_PRIVATE
EXTRA_CFLAGS += -DNO_I_PRIVATE
endif
+ifdef NO_PAGE_MKWRITE
+EXTRA_CFLAGS += -DNO_PAGE_MKWRITE
+endif
+
#
# Since SUBDIRS means something to kbuild, define them safely. Do not
# include trailing slashes.
--- a/fs/ocfs2/mmap.c 2008-02-02 10:22:52.000000000 -0500
+++ b/fs/ocfs2/mmap.c 2008-02-02 10:36:28.000000000 -0500
@@ -114,6 +114,7 @@ out:
}
#endif
+#ifndef NO_PAGE_MKWRITE
static int __ocfs2_page_mkwrite(struct inode *inode, struct buffer_head *di_bh,
struct page *page)
{
@@ -232,6 +233,7 @@ out:
mlog_exit(ret);
return ret;
}
+#endif
static struct vm_operations_struct ocfs2_file_vm_ops = {
#ifndef NO_FAULT_IN_VMOPS
@@ -239,7 +241,9 @@ static struct vm_operations_struct ocfs2
#else
.nopage = ocfs2_nopage,
#endif
+#ifndef NO_PAGE_MKWRITE
.page_mkwrite = ocfs2_page_mkwrite,
+#endif
};
int ocfs2_mmap(struct file *file, struct vm_area_struct *vma)
_______________________________________________
Ocfs2-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/ocfs2-devel