diff options
Diffstat (limited to 'fs/ocfs2/ioctl.c')
-rw-r--r-- | fs/ocfs2/ioctl.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c index f3ad21ad9aed..bd68c3f2afbe 100644 --- a/fs/ocfs2/ioctl.c +++ b/fs/ocfs2/ioctl.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include "ocfs2.h" | 14 | #include "ocfs2.h" |
15 | #include "alloc.h" | 15 | #include "alloc.h" |
16 | #include "dlmglue.h" | 16 | #include "dlmglue.h" |
17 | #include "file.h" | ||
17 | #include "inode.h" | 18 | #include "inode.h" |
18 | #include "journal.h" | 19 | #include "journal.h" |
19 | 20 | ||
@@ -115,6 +116,7 @@ int ocfs2_ioctl(struct inode * inode, struct file * filp, | |||
115 | { | 116 | { |
116 | unsigned int flags; | 117 | unsigned int flags; |
117 | int status; | 118 | int status; |
119 | struct ocfs2_space_resv sr; | ||
118 | 120 | ||
119 | switch (cmd) { | 121 | switch (cmd) { |
120 | case OCFS2_IOC_GETFLAGS: | 122 | case OCFS2_IOC_GETFLAGS: |
@@ -130,6 +132,14 @@ int ocfs2_ioctl(struct inode * inode, struct file * filp, | |||
130 | 132 | ||
131 | return ocfs2_set_inode_attr(inode, flags, | 133 | return ocfs2_set_inode_attr(inode, flags, |
132 | OCFS2_FL_MODIFIABLE); | 134 | OCFS2_FL_MODIFIABLE); |
135 | case OCFS2_IOC_RESVSP: | ||
136 | case OCFS2_IOC_RESVSP64: | ||
137 | case OCFS2_IOC_UNRESVSP: | ||
138 | case OCFS2_IOC_UNRESVSP64: | ||
139 | if (copy_from_user(&sr, (int __user *) arg, sizeof(sr))) | ||
140 | return -EFAULT; | ||
141 | |||
142 | return ocfs2_change_file_space(filp, cmd, &sr); | ||
133 | default: | 143 | default: |
134 | return -ENOTTY; | 144 | return -ENOTTY; |
135 | } | 145 | } |
@@ -148,6 +158,11 @@ long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg) | |||
148 | case OCFS2_IOC32_SETFLAGS: | 158 | case OCFS2_IOC32_SETFLAGS: |
149 | cmd = OCFS2_IOC_SETFLAGS; | 159 | cmd = OCFS2_IOC_SETFLAGS; |
150 | break; | 160 | break; |
161 | case OCFS2_IOC_RESVSP: | ||
162 | case OCFS2_IOC_RESVSP64: | ||
163 | case OCFS2_IOC_UNRESVSP: | ||
164 | case OCFS2_IOC_UNRESVSP64: | ||
165 | break; | ||
151 | default: | 166 | default: |
152 | return -ENOIOCTLCMD; | 167 | return -ENOIOCTLCMD; |
153 | } | 168 | } |