%patch
Index: linux-2.6.18/MAINTAINERS
===================================================================
--- linux-2.6.18.orig/MAINTAINERS 2006-09-20 13:42:06.000000000 +1000
+++ linux-2.6.18/MAINTAINERS 2006-10-12 16:23:23.875096557 +1000
@@ -3311,6 +3311,14 @@
T: git git://oss.sgi.com:8090/xfs/xfs-2.6
S: Supported
+DMAPI
+P: Silicon Graphics Inc
+M: xfs-masters@oss.sgi.com
+M: vapo@sgi.com
+L: xfs@oss.sgi.com
+W: http://oss.sgi.com/projects/xfs
+S: Supported
+
X86 3-LEVEL PAGING (PAE) SUPPORT
P: Ingo Molnar
M: mingo@redhat.com
Index: linux-2.6.18/fs/Kconfig
===================================================================
--- linux-2.6.18.orig/fs/Kconfig 2006-09-20 13:42:06.000000000 +1000
+++ linux-2.6.18/fs/Kconfig 2006-10-12 16:23:23.879096041 +1000
@@ -427,6 +427,25 @@
If unsure, say Y.
+config DMAPI
+ tristate "DMAPI support"
+ help
+ The Data Management API is a system interface used to implement
+ the interface defined in the X/Open document:
+ "Systems Management: Data Storage Management (XDSM) API",
+ dated February 1997. This interface is used by hierarchical
+ storage management systems.
+
+ If any DMAPI-capable filesystem is built into the kernel, then
+ DMAPI must also be built into the kernel.
+
+config DMAPI_DEBUG
+ bool "DMAPI debugging support"
+ depends on DMAPI
+ help
+ If you don't know whether you need it, then you don't need it:
+ answer N.
+
config QUOTA
bool "Quota support"
help
Index: linux-2.6.18/fs/Makefile
===================================================================
--- linux-2.6.18.orig/fs/Makefile 2006-09-20 13:42:06.000000000 +1000
+++ linux-2.6.18/fs/Makefile 2006-10-12 16:23:23.879096041 +1000
@@ -41,6 +41,8 @@
obj-$(CONFIG_QFMT_V2) += quota_v2.o
obj-$(CONFIG_QUOTACTL) += quota.o
+obj-$(CONFIG_DMAPI) += dmapi/
+
obj-$(CONFIG_DNOTIFY) += dnotify.o
obj-$(CONFIG_PROC_FS) += proc/
Index: linux-2.6.18/fs/exec.c
===================================================================
--- linux-2.6.18.orig/fs/exec.c 2006-09-20 13:42:06.000000000 +1000
+++ linux-2.6.18/fs/exec.c 2006-10-12 16:23:23.879096041 +1000
@@ -490,6 +490,13 @@
if (!err) {
file = nameidata_to_filp(&nd, O_RDONLY);
if (!IS_ERR(file)) {
+ if (file->f_op && file->f_op->open_exec) {
+ err = file->f_op->open_exec(inode);
+ if (err) {
+ fput(file);
+ return ERR_PTR(err);
+ }
+ }
err = deny_write_access(file);
if (err) {
fput(file);
Index: linux-2.6.18/include/linux/mm.h
===================================================================
--- linux-2.6.18.orig/include/linux/mm.h 2006-09-20 13:42:06.000000000 +1000
+++ linux-2.6.18/include/linux/mm.h 2006-10-12 16:25:17.468432082 +1000
@@ -199,6 +199,9 @@
struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type);
int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock);
+#define HAVE_VMOP_MPROTECT
+ int (*mprotect)(struct vm_area_struct * area, unsigned int newflags);
+
/* notification that a previously read-only page is about to become
* writable, if an error is returned it will cause a SIGBUS */
int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);
Index: linux-2.6.18/include/linux/fs.h
===================================================================
--- linux-2.6.18.orig/include/linux/fs.h 2006-09-20 13:42:06.000000000 +1000
+++ linux-2.6.18/include/linux/fs.h 2006-10-12 16:23:23.883095525 +1000
@@ -1081,6 +1081,8 @@
int (*flock) (struct file *, int, struct file_lock *);
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
+#define HAVE_FOP_OPEN_EXEC
+ int (*open_exec) (struct inode *);
};
struct inode_operations {
Index: linux-2.6.18/mm/mprotect.c
===================================================================
--- linux-2.6.18.orig/mm/mprotect.c 2006-09-20 13:42:06.000000000 +1000
+++ linux-2.6.18/mm/mprotect.c 2006-10-12 16:23:23.883095525 +1000
@@ -278,6 +278,11 @@
if (error)
goto out;
+ if (vma->vm_ops && vma->vm_ops->mprotect) {
+ error = vma->vm_ops->mprotect(vma, newflags);
+ if (error < 0)
+ goto out;
+ }
tmp = vma->vm_end;
if (tmp > end)
tmp = end;