1 Date: Thu, 09 Oct 2008 17:11:14 +1100
2 From: Donald Douwsma <donaldd@sgi.com>
3 Subject: VFS changes to support DMAPI
7 VFS changes to support DMAPI including open_exec(), mprotect()
8 and build infastructure.
10 Acked-by: Jan Kara <jack@suse.cz>
13 MAINTAINERS | 7 +++++++
14 fs/Kconfig | 19 +++++++++++++++++++
16 fs/exec.c | 8 ++++++++
17 include/linux/fs.h | 2 ++
18 include/linux/mm.h | 3 +++
19 mm/mprotect.c | 5 +++++
20 7 files changed, 46 insertions(+)
24 @@ -690,6 +690,14 @@ struct file *open_exec(const char *name)
28 + if (file->f_op && file->f_op->open_exec) {
29 + err = file->f_op->open_exec(nd.path.dentry->d_inode);
36 err = deny_write_access(file);
41 @@ -557,6 +557,25 @@ config INOTIFY_USER
46 + tristate "DMAPI support"
48 + The Data Management API is a system interface used to implement
49 + the interface defined in the X/Open document:
50 + "Systems Management: Data Storage Management (XDSM) API",
51 + dated February 1997. This interface is used by hierarchical
52 + storage management systems.
54 + If any DMAPI-capable filesystem is built into the kernel, then
55 + DMAPI must also be built into the kernel.
58 + bool "DMAPI debugging support"
61 + If you don't know whether you need it, then you don't need it:
69 @@ -56,6 +56,8 @@ obj-$(CONFIG_QFMT_V2) += quota_v2.o
70 obj-$(CONFIG_QUOTA_TREE) += quota_tree.o
71 obj-$(CONFIG_QUOTACTL) += quota.o
73 +obj-$(CONFIG_DMAPI) += dmapi/
75 obj-$(CONFIG_DNOTIFY) += dnotify.o
77 obj-$(CONFIG_PROC_FS) += proc/
78 --- a/include/linux/fs.h
79 +++ b/include/linux/fs.h
80 @@ -1271,6 +1271,8 @@ struct file_operations {
81 int (*flock) (struct file *, int, struct file_lock *);
82 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
83 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
84 +#define HAVE_FOP_OPEN_EXEC
85 + int (*open_exec) (struct inode *);
86 int (*setlease)(struct file *, long, struct file_lock **);
89 --- a/include/linux/mm.h
90 +++ b/include/linux/mm.h
91 @@ -173,6 +173,9 @@ struct vm_operations_struct {
92 void (*close)(struct vm_area_struct * area);
93 int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);
95 +#define HAVE_VMOP_MPROTECT
96 + int (*mprotect)(struct vm_area_struct * area, unsigned int newflags);
99 int (*page_mkwrite)(struct vm_area_struct *, struct page *);
103 @@ -4584,6 +4584,13 @@ W: http://oss.sgi.com/projects/xfs
104 T: git git://oss.sgi.com:8090/xfs/xfs-2.6.git
108 +P: Silicon Graphics Inc
109 +M: xfs-masters@oss.sgi.com
111 +W: http://oss.sgi.com/projects/xfs
114 XILINX SYSTEMACE DRIVER
116 M: grant.likely@secretlab.ca
119 @@ -294,6 +294,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
123 + if (vma->vm_ops && vma->vm_ops->mprotect) {
124 + error = vma->vm_ops->mprotect(vma, newflags);