diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_file.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_file.c | 187 |
1 files changed, 94 insertions, 93 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index ced4404339c7..85997b1205f5 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
@@ -43,13 +43,13 @@ | |||
43 | #include <linux/dcache.h> | 43 | #include <linux/dcache.h> |
44 | #include <linux/smp_lock.h> | 44 | #include <linux/smp_lock.h> |
45 | 45 | ||
46 | static struct vm_operations_struct linvfs_file_vm_ops; | 46 | static struct vm_operations_struct xfs_file_vm_ops; |
47 | #ifdef CONFIG_XFS_DMAPI | 47 | #ifdef CONFIG_XFS_DMAPI |
48 | static struct vm_operations_struct linvfs_dmapi_file_vm_ops; | 48 | static struct vm_operations_struct xfs_dmapi_file_vm_ops; |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | STATIC inline ssize_t | 51 | STATIC inline ssize_t |
52 | __linvfs_read( | 52 | __xfs_file_read( |
53 | struct kiocb *iocb, | 53 | struct kiocb *iocb, |
54 | char __user *buf, | 54 | char __user *buf, |
55 | int ioflags, | 55 | int ioflags, |
@@ -58,7 +58,7 @@ __linvfs_read( | |||
58 | { | 58 | { |
59 | struct iovec iov = {buf, count}; | 59 | struct iovec iov = {buf, count}; |
60 | struct file *file = iocb->ki_filp; | 60 | struct file *file = iocb->ki_filp; |
61 | vnode_t *vp = LINVFS_GET_VP(file->f_dentry->d_inode); | 61 | vnode_t *vp = vn_from_inode(file->f_dentry->d_inode); |
62 | ssize_t rval; | 62 | ssize_t rval; |
63 | 63 | ||
64 | BUG_ON(iocb->ki_pos != pos); | 64 | BUG_ON(iocb->ki_pos != pos); |
@@ -71,28 +71,28 @@ __linvfs_read( | |||
71 | 71 | ||
72 | 72 | ||
73 | STATIC ssize_t | 73 | STATIC ssize_t |
74 | linvfs_aio_read( | 74 | xfs_file_aio_read( |
75 | struct kiocb *iocb, | 75 | struct kiocb *iocb, |
76 | char __user *buf, | 76 | char __user *buf, |
77 | size_t count, | 77 | size_t count, |
78 | loff_t pos) | 78 | loff_t pos) |
79 | { | 79 | { |
80 | return __linvfs_read(iocb, buf, IO_ISAIO, count, pos); | 80 | return __xfs_file_read(iocb, buf, IO_ISAIO, count, pos); |
81 | } | 81 | } |
82 | 82 | ||
83 | STATIC ssize_t | 83 | STATIC ssize_t |
84 | linvfs_aio_read_invis( | 84 | xfs_file_aio_read_invis( |
85 | struct kiocb *iocb, | 85 | struct kiocb *iocb, |
86 | char __user *buf, | 86 | char __user *buf, |
87 | size_t count, | 87 | size_t count, |
88 | loff_t pos) | 88 | loff_t pos) |
89 | { | 89 | { |
90 | return __linvfs_read(iocb, buf, IO_ISAIO|IO_INVIS, count, pos); | 90 | return __xfs_file_read(iocb, buf, IO_ISAIO|IO_INVIS, count, pos); |
91 | } | 91 | } |
92 | 92 | ||
93 | 93 | ||
94 | STATIC inline ssize_t | 94 | STATIC inline ssize_t |
95 | __linvfs_write( | 95 | __xfs_file_write( |
96 | struct kiocb *iocb, | 96 | struct kiocb *iocb, |
97 | const char __user *buf, | 97 | const char __user *buf, |
98 | int ioflags, | 98 | int ioflags, |
@@ -102,7 +102,7 @@ __linvfs_write( | |||
102 | struct iovec iov = {(void __user *)buf, count}; | 102 | struct iovec iov = {(void __user *)buf, count}; |
103 | struct file *file = iocb->ki_filp; | 103 | struct file *file = iocb->ki_filp; |
104 | struct inode *inode = file->f_mapping->host; | 104 | struct inode *inode = file->f_mapping->host; |
105 | vnode_t *vp = LINVFS_GET_VP(inode); | 105 | vnode_t *vp = vn_from_inode(inode); |
106 | ssize_t rval; | 106 | ssize_t rval; |
107 | 107 | ||
108 | BUG_ON(iocb->ki_pos != pos); | 108 | BUG_ON(iocb->ki_pos != pos); |
@@ -115,28 +115,28 @@ __linvfs_write( | |||
115 | 115 | ||
116 | 116 | ||
117 | STATIC ssize_t | 117 | STATIC ssize_t |
118 | linvfs_aio_write( | 118 | xfs_file_aio_write( |
119 | struct kiocb *iocb, | 119 | struct kiocb *iocb, |
120 | const char __user *buf, | 120 | const char __user *buf, |
121 | size_t count, | 121 | size_t count, |
122 | loff_t pos) | 122 | loff_t pos) |
123 | { | 123 | { |
124 | return __linvfs_write(iocb, buf, IO_ISAIO, count, pos); | 124 | return __xfs_file_write(iocb, buf, IO_ISAIO, count, pos); |
125 | } | 125 | } |
126 | 126 | ||
127 | STATIC ssize_t | 127 | STATIC ssize_t |
128 | linvfs_aio_write_invis( | 128 | xfs_file_aio_write_invis( |
129 | struct kiocb *iocb, | 129 | struct kiocb *iocb, |
130 | const char __user *buf, | 130 | const char __user *buf, |
131 | size_t count, | 131 | size_t count, |
132 | loff_t pos) | 132 | loff_t pos) |
133 | { | 133 | { |
134 | return __linvfs_write(iocb, buf, IO_ISAIO|IO_INVIS, count, pos); | 134 | return __xfs_file_write(iocb, buf, IO_ISAIO|IO_INVIS, count, pos); |
135 | } | 135 | } |
136 | 136 | ||
137 | 137 | ||
138 | STATIC inline ssize_t | 138 | STATIC inline ssize_t |
139 | __linvfs_readv( | 139 | __xfs_file_readv( |
140 | struct file *file, | 140 | struct file *file, |
141 | const struct iovec *iov, | 141 | const struct iovec *iov, |
142 | int ioflags, | 142 | int ioflags, |
@@ -144,8 +144,8 @@ __linvfs_readv( | |||
144 | loff_t *ppos) | 144 | loff_t *ppos) |
145 | { | 145 | { |
146 | struct inode *inode = file->f_mapping->host; | 146 | struct inode *inode = file->f_mapping->host; |
147 | vnode_t *vp = LINVFS_GET_VP(inode); | 147 | vnode_t *vp = vn_from_inode(inode); |
148 | struct kiocb kiocb; | 148 | struct kiocb kiocb; |
149 | ssize_t rval; | 149 | ssize_t rval; |
150 | 150 | ||
151 | init_sync_kiocb(&kiocb, file); | 151 | init_sync_kiocb(&kiocb, file); |
@@ -160,28 +160,28 @@ __linvfs_readv( | |||
160 | } | 160 | } |
161 | 161 | ||
162 | STATIC ssize_t | 162 | STATIC ssize_t |
163 | linvfs_readv( | 163 | xfs_file_readv( |
164 | struct file *file, | 164 | struct file *file, |
165 | const struct iovec *iov, | 165 | const struct iovec *iov, |
166 | unsigned long nr_segs, | 166 | unsigned long nr_segs, |
167 | loff_t *ppos) | 167 | loff_t *ppos) |
168 | { | 168 | { |
169 | return __linvfs_readv(file, iov, 0, nr_segs, ppos); | 169 | return __xfs_file_readv(file, iov, 0, nr_segs, ppos); |
170 | } | 170 | } |
171 | 171 | ||
172 | STATIC ssize_t | 172 | STATIC ssize_t |
173 | linvfs_readv_invis( | 173 | xfs_file_readv_invis( |
174 | struct file *file, | 174 | struct file *file, |
175 | const struct iovec *iov, | 175 | const struct iovec *iov, |
176 | unsigned long nr_segs, | 176 | unsigned long nr_segs, |
177 | loff_t *ppos) | 177 | loff_t *ppos) |
178 | { | 178 | { |
179 | return __linvfs_readv(file, iov, IO_INVIS, nr_segs, ppos); | 179 | return __xfs_file_readv(file, iov, IO_INVIS, nr_segs, ppos); |
180 | } | 180 | } |
181 | 181 | ||
182 | 182 | ||
183 | STATIC inline ssize_t | 183 | STATIC inline ssize_t |
184 | __linvfs_writev( | 184 | __xfs_file_writev( |
185 | struct file *file, | 185 | struct file *file, |
186 | const struct iovec *iov, | 186 | const struct iovec *iov, |
187 | int ioflags, | 187 | int ioflags, |
@@ -189,8 +189,8 @@ __linvfs_writev( | |||
189 | loff_t *ppos) | 189 | loff_t *ppos) |
190 | { | 190 | { |
191 | struct inode *inode = file->f_mapping->host; | 191 | struct inode *inode = file->f_mapping->host; |
192 | vnode_t *vp = LINVFS_GET_VP(inode); | 192 | vnode_t *vp = vn_from_inode(inode); |
193 | struct kiocb kiocb; | 193 | struct kiocb kiocb; |
194 | ssize_t rval; | 194 | ssize_t rval; |
195 | 195 | ||
196 | init_sync_kiocb(&kiocb, file); | 196 | init_sync_kiocb(&kiocb, file); |
@@ -206,34 +206,34 @@ __linvfs_writev( | |||
206 | 206 | ||
207 | 207 | ||
208 | STATIC ssize_t | 208 | STATIC ssize_t |
209 | linvfs_writev( | 209 | xfs_file_writev( |
210 | struct file *file, | 210 | struct file *file, |
211 | const struct iovec *iov, | 211 | const struct iovec *iov, |
212 | unsigned long nr_segs, | 212 | unsigned long nr_segs, |
213 | loff_t *ppos) | 213 | loff_t *ppos) |
214 | { | 214 | { |
215 | return __linvfs_writev(file, iov, 0, nr_segs, ppos); | 215 | return __xfs_file_writev(file, iov, 0, nr_segs, ppos); |
216 | } | 216 | } |
217 | 217 | ||
218 | STATIC ssize_t | 218 | STATIC ssize_t |
219 | linvfs_writev_invis( | 219 | xfs_file_writev_invis( |
220 | struct file *file, | 220 | struct file *file, |
221 | const struct iovec *iov, | 221 | const struct iovec *iov, |
222 | unsigned long nr_segs, | 222 | unsigned long nr_segs, |
223 | loff_t *ppos) | 223 | loff_t *ppos) |
224 | { | 224 | { |
225 | return __linvfs_writev(file, iov, IO_INVIS, nr_segs, ppos); | 225 | return __xfs_file_writev(file, iov, IO_INVIS, nr_segs, ppos); |
226 | } | 226 | } |
227 | 227 | ||
228 | STATIC ssize_t | 228 | STATIC ssize_t |
229 | linvfs_sendfile( | 229 | xfs_file_sendfile( |
230 | struct file *filp, | 230 | struct file *filp, |
231 | loff_t *ppos, | 231 | loff_t *ppos, |
232 | size_t count, | 232 | size_t count, |
233 | read_actor_t actor, | 233 | read_actor_t actor, |
234 | void *target) | 234 | void *target) |
235 | { | 235 | { |
236 | vnode_t *vp = LINVFS_GET_VP(filp->f_dentry->d_inode); | 236 | vnode_t *vp = vn_from_inode(filp->f_dentry->d_inode); |
237 | ssize_t rval; | 237 | ssize_t rval; |
238 | 238 | ||
239 | VOP_SENDFILE(vp, filp, ppos, 0, count, actor, target, NULL, rval); | 239 | VOP_SENDFILE(vp, filp, ppos, 0, count, actor, target, NULL, rval); |
@@ -242,11 +242,11 @@ linvfs_sendfile( | |||
242 | 242 | ||
243 | 243 | ||
244 | STATIC int | 244 | STATIC int |
245 | linvfs_open( | 245 | xfs_file_open( |
246 | struct inode *inode, | 246 | struct inode *inode, |
247 | struct file *filp) | 247 | struct file *filp) |
248 | { | 248 | { |
249 | vnode_t *vp = LINVFS_GET_VP(inode); | 249 | vnode_t *vp = vn_from_inode(inode); |
250 | int error; | 250 | int error; |
251 | 251 | ||
252 | if (!(filp->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS) | 252 | if (!(filp->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS) |
@@ -259,11 +259,11 @@ linvfs_open( | |||
259 | 259 | ||
260 | 260 | ||
261 | STATIC int | 261 | STATIC int |
262 | linvfs_release( | 262 | xfs_file_release( |
263 | struct inode *inode, | 263 | struct inode *inode, |
264 | struct file *filp) | 264 | struct file *filp) |
265 | { | 265 | { |
266 | vnode_t *vp = LINVFS_GET_VP(inode); | 266 | vnode_t *vp = vn_from_inode(inode); |
267 | int error = 0; | 267 | int error = 0; |
268 | 268 | ||
269 | if (vp) | 269 | if (vp) |
@@ -273,13 +273,13 @@ linvfs_release( | |||
273 | 273 | ||
274 | 274 | ||
275 | STATIC int | 275 | STATIC int |
276 | linvfs_fsync( | 276 | xfs_file_fsync( |
277 | struct file *filp, | 277 | struct file *filp, |
278 | struct dentry *dentry, | 278 | struct dentry *dentry, |
279 | int datasync) | 279 | int datasync) |
280 | { | 280 | { |
281 | struct inode *inode = dentry->d_inode; | 281 | struct inode *inode = dentry->d_inode; |
282 | vnode_t *vp = LINVFS_GET_VP(inode); | 282 | vnode_t *vp = vn_from_inode(inode); |
283 | int error; | 283 | int error; |
284 | int flags = FSYNC_WAIT; | 284 | int flags = FSYNC_WAIT; |
285 | 285 | ||
@@ -292,7 +292,7 @@ linvfs_fsync( | |||
292 | } | 292 | } |
293 | 293 | ||
294 | /* | 294 | /* |
295 | * linvfs_readdir maps to VOP_READDIR(). | 295 | * xfs_file_readdir maps to VOP_READDIR(). |
296 | * We need to build a uio, cred, ... | 296 | * We need to build a uio, cred, ... |
297 | */ | 297 | */ |
298 | 298 | ||
@@ -301,13 +301,13 @@ linvfs_fsync( | |||
301 | #ifdef CONFIG_XFS_DMAPI | 301 | #ifdef CONFIG_XFS_DMAPI |
302 | 302 | ||
303 | STATIC struct page * | 303 | STATIC struct page * |
304 | linvfs_filemap_nopage( | 304 | xfs_vm_nopage( |
305 | struct vm_area_struct *area, | 305 | struct vm_area_struct *area, |
306 | unsigned long address, | 306 | unsigned long address, |
307 | int *type) | 307 | int *type) |
308 | { | 308 | { |
309 | struct inode *inode = area->vm_file->f_dentry->d_inode; | 309 | struct inode *inode = area->vm_file->f_dentry->d_inode; |
310 | vnode_t *vp = LINVFS_GET_VP(inode); | 310 | vnode_t *vp = vn_from_inode(inode); |
311 | xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); | 311 | xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); |
312 | int error; | 312 | int error; |
313 | 313 | ||
@@ -324,7 +324,7 @@ linvfs_filemap_nopage( | |||
324 | 324 | ||
325 | 325 | ||
326 | STATIC int | 326 | STATIC int |
327 | linvfs_readdir( | 327 | xfs_file_readdir( |
328 | struct file *filp, | 328 | struct file *filp, |
329 | void *dirent, | 329 | void *dirent, |
330 | filldir_t filldir) | 330 | filldir_t filldir) |
@@ -340,7 +340,7 @@ linvfs_readdir( | |||
340 | xfs_off_t start_offset, curr_offset; | 340 | xfs_off_t start_offset, curr_offset; |
341 | xfs_dirent_t *dbp = NULL; | 341 | xfs_dirent_t *dbp = NULL; |
342 | 342 | ||
343 | vp = LINVFS_GET_VP(filp->f_dentry->d_inode); | 343 | vp = vn_from_inode(filp->f_dentry->d_inode); |
344 | ASSERT(vp); | 344 | ASSERT(vp); |
345 | 345 | ||
346 | /* Try fairly hard to get memory */ | 346 | /* Try fairly hard to get memory */ |
@@ -404,39 +404,40 @@ done: | |||
404 | 404 | ||
405 | 405 | ||
406 | STATIC int | 406 | STATIC int |
407 | linvfs_file_mmap( | 407 | xfs_file_mmap( |
408 | struct file *filp, | 408 | struct file *filp, |
409 | struct vm_area_struct *vma) | 409 | struct vm_area_struct *vma) |
410 | { | 410 | { |
411 | struct inode *ip = filp->f_dentry->d_inode; | 411 | struct inode *ip = filp->f_dentry->d_inode; |
412 | vnode_t *vp = LINVFS_GET_VP(ip); | 412 | vnode_t *vp = vn_from_inode(ip); |
413 | vattr_t va = { .va_mask = XFS_AT_UPDATIME }; | 413 | vattr_t vattr; |
414 | int error; | 414 | int error; |
415 | 415 | ||
416 | vma->vm_ops = &linvfs_file_vm_ops; | 416 | vma->vm_ops = &xfs_file_vm_ops; |
417 | 417 | ||
418 | #ifdef CONFIG_XFS_DMAPI | 418 | #ifdef CONFIG_XFS_DMAPI |
419 | if (vp->v_vfsp->vfs_flag & VFS_DMI) { | 419 | if (vp->v_vfsp->vfs_flag & VFS_DMI) { |
420 | vma->vm_ops = &linvfs_dmapi_file_vm_ops; | 420 | vma->vm_ops = &xfs_dmapi_file_vm_ops; |
421 | } | 421 | } |
422 | #endif /* CONFIG_XFS_DMAPI */ | 422 | #endif /* CONFIG_XFS_DMAPI */ |
423 | 423 | ||
424 | VOP_SETATTR(vp, &va, XFS_AT_UPDATIME, NULL, error); | 424 | vattr.va_mask = XFS_AT_UPDATIME; |
425 | if (!error) | 425 | VOP_SETATTR(vp, &vattr, XFS_AT_UPDATIME, NULL, error); |
426 | vn_revalidate(vp); /* update Linux inode flags */ | 426 | if (likely(!error)) |
427 | __vn_revalidate(vp, &vattr); /* update flags */ | ||
427 | return 0; | 428 | return 0; |
428 | } | 429 | } |
429 | 430 | ||
430 | 431 | ||
431 | STATIC long | 432 | STATIC long |
432 | linvfs_ioctl( | 433 | xfs_file_ioctl( |
433 | struct file *filp, | 434 | struct file *filp, |
434 | unsigned int cmd, | 435 | unsigned int cmd, |
435 | unsigned long arg) | 436 | unsigned long arg) |
436 | { | 437 | { |
437 | int error; | 438 | int error; |
438 | struct inode *inode = filp->f_dentry->d_inode; | 439 | struct inode *inode = filp->f_dentry->d_inode; |
439 | vnode_t *vp = LINVFS_GET_VP(inode); | 440 | vnode_t *vp = vn_from_inode(inode); |
440 | 441 | ||
441 | VOP_IOCTL(vp, inode, filp, 0, cmd, (void __user *)arg, error); | 442 | VOP_IOCTL(vp, inode, filp, 0, cmd, (void __user *)arg, error); |
442 | VMODIFY(vp); | 443 | VMODIFY(vp); |
@@ -451,14 +452,14 @@ linvfs_ioctl( | |||
451 | } | 452 | } |
452 | 453 | ||
453 | STATIC long | 454 | STATIC long |
454 | linvfs_ioctl_invis( | 455 | xfs_file_ioctl_invis( |
455 | struct file *filp, | 456 | struct file *filp, |
456 | unsigned int cmd, | 457 | unsigned int cmd, |
457 | unsigned long arg) | 458 | unsigned long arg) |
458 | { | 459 | { |
459 | int error; | 460 | int error; |
460 | struct inode *inode = filp->f_dentry->d_inode; | 461 | struct inode *inode = filp->f_dentry->d_inode; |
461 | vnode_t *vp = LINVFS_GET_VP(inode); | 462 | vnode_t *vp = vn_from_inode(inode); |
462 | 463 | ||
463 | ASSERT(vp); | 464 | ASSERT(vp); |
464 | VOP_IOCTL(vp, inode, filp, IO_INVIS, cmd, (void __user *)arg, error); | 465 | VOP_IOCTL(vp, inode, filp, IO_INVIS, cmd, (void __user *)arg, error); |
@@ -476,11 +477,11 @@ linvfs_ioctl_invis( | |||
476 | #ifdef CONFIG_XFS_DMAPI | 477 | #ifdef CONFIG_XFS_DMAPI |
477 | #ifdef HAVE_VMOP_MPROTECT | 478 | #ifdef HAVE_VMOP_MPROTECT |
478 | STATIC int | 479 | STATIC int |
479 | linvfs_mprotect( | 480 | xfs_vm_mprotect( |
480 | struct vm_area_struct *vma, | 481 | struct vm_area_struct *vma, |
481 | unsigned int newflags) | 482 | unsigned int newflags) |
482 | { | 483 | { |
483 | vnode_t *vp = LINVFS_GET_VP(vma->vm_file->f_dentry->d_inode); | 484 | vnode_t *vp = vn_from_inode(vma->vm_file->f_dentry->d_inode); |
484 | int error = 0; | 485 | int error = 0; |
485 | 486 | ||
486 | if (vp->v_vfsp->vfs_flag & VFS_DMI) { | 487 | if (vp->v_vfsp->vfs_flag & VFS_DMI) { |
@@ -503,10 +504,10 @@ linvfs_mprotect( | |||
503 | * it back online. | 504 | * it back online. |
504 | */ | 505 | */ |
505 | STATIC int | 506 | STATIC int |
506 | linvfs_open_exec( | 507 | xfs_file_open_exec( |
507 | struct inode *inode) | 508 | struct inode *inode) |
508 | { | 509 | { |
509 | vnode_t *vp = LINVFS_GET_VP(inode); | 510 | vnode_t *vp = vn_from_inode(inode); |
510 | xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); | 511 | xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); |
511 | int error = 0; | 512 | int error = 0; |
512 | xfs_inode_t *ip; | 513 | xfs_inode_t *ip; |
@@ -527,69 +528,69 @@ open_exec_out: | |||
527 | } | 528 | } |
528 | #endif /* HAVE_FOP_OPEN_EXEC */ | 529 | #endif /* HAVE_FOP_OPEN_EXEC */ |
529 | 530 | ||
530 | struct file_operations linvfs_file_operations = { | 531 | const struct file_operations xfs_file_operations = { |
531 | .llseek = generic_file_llseek, | 532 | .llseek = generic_file_llseek, |
532 | .read = do_sync_read, | 533 | .read = do_sync_read, |
533 | .write = do_sync_write, | 534 | .write = do_sync_write, |
534 | .readv = linvfs_readv, | 535 | .readv = xfs_file_readv, |
535 | .writev = linvfs_writev, | 536 | .writev = xfs_file_writev, |
536 | .aio_read = linvfs_aio_read, | 537 | .aio_read = xfs_file_aio_read, |
537 | .aio_write = linvfs_aio_write, | 538 | .aio_write = xfs_file_aio_write, |
538 | .sendfile = linvfs_sendfile, | 539 | .sendfile = xfs_file_sendfile, |
539 | .unlocked_ioctl = linvfs_ioctl, | 540 | .unlocked_ioctl = xfs_file_ioctl, |
540 | #ifdef CONFIG_COMPAT | 541 | #ifdef CONFIG_COMPAT |
541 | .compat_ioctl = linvfs_compat_ioctl, | 542 | .compat_ioctl = xfs_file_compat_ioctl, |
542 | #endif | 543 | #endif |
543 | .mmap = linvfs_file_mmap, | 544 | .mmap = xfs_file_mmap, |
544 | .open = linvfs_open, | 545 | .open = xfs_file_open, |
545 | .release = linvfs_release, | 546 | .release = xfs_file_release, |
546 | .fsync = linvfs_fsync, | 547 | .fsync = xfs_file_fsync, |
547 | #ifdef HAVE_FOP_OPEN_EXEC | 548 | #ifdef HAVE_FOP_OPEN_EXEC |
548 | .open_exec = linvfs_open_exec, | 549 | .open_exec = xfs_file_open_exec, |
549 | #endif | 550 | #endif |
550 | }; | 551 | }; |
551 | 552 | ||
552 | struct file_operations linvfs_invis_file_operations = { | 553 | const struct file_operations xfs_invis_file_operations = { |
553 | .llseek = generic_file_llseek, | 554 | .llseek = generic_file_llseek, |
554 | .read = do_sync_read, | 555 | .read = do_sync_read, |
555 | .write = do_sync_write, | 556 | .write = do_sync_write, |
556 | .readv = linvfs_readv_invis, | 557 | .readv = xfs_file_readv_invis, |
557 | .writev = linvfs_writev_invis, | 558 | .writev = xfs_file_writev_invis, |
558 | .aio_read = linvfs_aio_read_invis, | 559 | .aio_read = xfs_file_aio_read_invis, |
559 | .aio_write = linvfs_aio_write_invis, | 560 | .aio_write = xfs_file_aio_write_invis, |
560 | .sendfile = linvfs_sendfile, | 561 | .sendfile = xfs_file_sendfile, |
561 | .unlocked_ioctl = linvfs_ioctl_invis, | 562 | .unlocked_ioctl = xfs_file_ioctl_invis, |
562 | #ifdef CONFIG_COMPAT | 563 | #ifdef CONFIG_COMPAT |
563 | .compat_ioctl = linvfs_compat_invis_ioctl, | 564 | .compat_ioctl = xfs_file_compat_invis_ioctl, |
564 | #endif | 565 | #endif |
565 | .mmap = linvfs_file_mmap, | 566 | .mmap = xfs_file_mmap, |
566 | .open = linvfs_open, | 567 | .open = xfs_file_open, |
567 | .release = linvfs_release, | 568 | .release = xfs_file_release, |
568 | .fsync = linvfs_fsync, | 569 | .fsync = xfs_file_fsync, |
569 | }; | 570 | }; |
570 | 571 | ||
571 | 572 | ||
572 | struct file_operations linvfs_dir_operations = { | 573 | const struct file_operations xfs_dir_file_operations = { |
573 | .read = generic_read_dir, | 574 | .read = generic_read_dir, |
574 | .readdir = linvfs_readdir, | 575 | .readdir = xfs_file_readdir, |
575 | .unlocked_ioctl = linvfs_ioctl, | 576 | .unlocked_ioctl = xfs_file_ioctl, |
576 | #ifdef CONFIG_COMPAT | 577 | #ifdef CONFIG_COMPAT |
577 | .compat_ioctl = linvfs_compat_ioctl, | 578 | .compat_ioctl = xfs_file_compat_ioctl, |
578 | #endif | 579 | #endif |
579 | .fsync = linvfs_fsync, | 580 | .fsync = xfs_file_fsync, |
580 | }; | 581 | }; |
581 | 582 | ||
582 | static struct vm_operations_struct linvfs_file_vm_ops = { | 583 | static struct vm_operations_struct xfs_file_vm_ops = { |
583 | .nopage = filemap_nopage, | 584 | .nopage = filemap_nopage, |
584 | .populate = filemap_populate, | 585 | .populate = filemap_populate, |
585 | }; | 586 | }; |
586 | 587 | ||
587 | #ifdef CONFIG_XFS_DMAPI | 588 | #ifdef CONFIG_XFS_DMAPI |
588 | static struct vm_operations_struct linvfs_dmapi_file_vm_ops = { | 589 | static struct vm_operations_struct xfs_dmapi_file_vm_ops = { |
589 | .nopage = linvfs_filemap_nopage, | 590 | .nopage = xfs_vm_nopage, |
590 | .populate = filemap_populate, | 591 | .populate = filemap_populate, |
591 | #ifdef HAVE_VMOP_MPROTECT | 592 | #ifdef HAVE_VMOP_MPROTECT |
592 | .mprotect = linvfs_mprotect, | 593 | .mprotect = xfs_vm_mprotect, |
593 | #endif | 594 | #endif |
594 | }; | 595 | }; |
595 | #endif /* CONFIG_XFS_DMAPI */ | 596 | #endif /* CONFIG_XFS_DMAPI */ |