%patch Index: linux-2.6.22/MAINTAINERS =================================================================== --- linux-2.6.22.orig/MAINTAINERS 2007-09-06 15:15:55.000000000 +1000 +++ linux-2.6.22/MAINTAINERS 2007-09-06 16:05:17.072217859 +1000 @@ -4175,6 +4175,14 @@ L: linux-serial@vger.kernel.org S: Maintained +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.22/fs/Kconfig =================================================================== --- linux-2.6.22.orig/fs/Kconfig 2007-09-06 15:16:19.000000000 +1000 +++ linux-2.6.22/fs/Kconfig 2007-09-06 16:05:17.092215191 +1000 @@ -524,6 +524,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.22/fs/Makefile =================================================================== --- linux-2.6.22.orig/fs/Makefile 2007-07-09 09:32:17.000000000 +1000 +++ linux-2.6.22/fs/Makefile 2007-09-06 16:05:17.092215191 +1000 @@ -53,6 +53,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.22/fs/exec.c =================================================================== --- linux-2.6.22.orig/fs/exec.c 2007-09-06 15:16:19.000000000 +1000 +++ linux-2.6.22/fs/exec.c 2007-09-06 16:05:17.092215191 +1000 @@ -688,6 +688,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.22/include/linux/mm.h =================================================================== --- linux-2.6.22.orig/include/linux/mm.h 2007-09-06 15:16:23.000000000 +1000 +++ linux-2.6.22/include/linux/mm.h 2007-09-06 16:05:17.120211456 +1000 @@ -232,6 +232,9 @@ unsigned long (*nopfn)(struct vm_area_struct *area, unsigned long address); +#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.22/include/linux/fs.h =================================================================== --- linux-2.6.22.orig/include/linux/fs.h 2007-09-06 15:16:23.000000000 +1000 +++ linux-2.6.22/include/linux/fs.h 2007-09-06 16:08:54.603200663 +1000 @@ -1129,6 +1129,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 *); int (*setlease)(struct file *, long, struct file_lock **); }; Index: linux-2.6.22/mm/mprotect.c =================================================================== --- linux-2.6.22.orig/mm/mprotect.c 2007-09-06 15:16:25.000000000 +1000 +++ linux-2.6.22/mm/mprotect.c 2007-09-06 16:05:17.168205053 +1000 @@ -289,6 +289,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;