aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c140
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.h6
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c4
4 files changed, 76 insertions, 76 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index ce8fe40e1628..b050e4079427 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
46static struct vm_operations_struct linvfs_file_vm_ops; 46static struct vm_operations_struct xfs_file_vm_ops;
47#ifdef CONFIG_XFS_DMAPI 47#ifdef CONFIG_XFS_DMAPI
48static struct vm_operations_struct linvfs_dmapi_file_vm_ops; 48static struct vm_operations_struct xfs_dmapi_file_vm_ops;
49#endif 49#endif
50 50
51STATIC inline ssize_t 51STATIC 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,
@@ -71,28 +71,28 @@ __linvfs_read(
71 71
72 72
73STATIC ssize_t 73STATIC ssize_t
74linvfs_aio_read( 74xfs_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
83STATIC ssize_t 83STATIC ssize_t
84linvfs_aio_read_invis( 84xfs_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
94STATIC inline ssize_t 94STATIC 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,
@@ -115,28 +115,28 @@ __linvfs_write(
115 115
116 116
117STATIC ssize_t 117STATIC ssize_t
118linvfs_aio_write( 118xfs_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
127STATIC ssize_t 127STATIC ssize_t
128linvfs_aio_write_invis( 128xfs_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
138STATIC inline ssize_t 138STATIC 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,
@@ -165,28 +165,28 @@ __linvfs_readv(
165} 165}
166 166
167STATIC ssize_t 167STATIC ssize_t
168linvfs_readv( 168xfs_file_readv(
169 struct file *file, 169 struct file *file,
170 const struct iovec *iov, 170 const struct iovec *iov,
171 unsigned long nr_segs, 171 unsigned long nr_segs,
172 loff_t *ppos) 172 loff_t *ppos)
173{ 173{
174 return __linvfs_readv(file, iov, 0, nr_segs, ppos); 174 return __xfs_file_readv(file, iov, 0, nr_segs, ppos);
175} 175}
176 176
177STATIC ssize_t 177STATIC ssize_t
178linvfs_readv_invis( 178xfs_file_readv_invis(
179 struct file *file, 179 struct file *file,
180 const struct iovec *iov, 180 const struct iovec *iov,
181 unsigned long nr_segs, 181 unsigned long nr_segs,
182 loff_t *ppos) 182 loff_t *ppos)
183{ 183{
184 return __linvfs_readv(file, iov, IO_INVIS, nr_segs, ppos); 184 return __xfs_file_readv(file, iov, IO_INVIS, nr_segs, ppos);
185} 185}
186 186
187 187
188STATIC inline ssize_t 188STATIC inline ssize_t
189__linvfs_writev( 189__xfs_file_writev(
190 struct file *file, 190 struct file *file,
191 const struct iovec *iov, 191 const struct iovec *iov,
192 int ioflags, 192 int ioflags,
@@ -216,27 +216,27 @@ __linvfs_writev(
216 216
217 217
218STATIC ssize_t 218STATIC ssize_t
219linvfs_writev( 219xfs_file_writev(
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, 0, nr_segs, ppos); 225 return __xfs_file_writev(file, iov, 0, nr_segs, ppos);
226} 226}
227 227
228STATIC ssize_t 228STATIC ssize_t
229linvfs_writev_invis( 229xfs_file_writev_invis(
230 struct file *file, 230 struct file *file,
231 const struct iovec *iov, 231 const struct iovec *iov,
232 unsigned long nr_segs, 232 unsigned long nr_segs,
233 loff_t *ppos) 233 loff_t *ppos)
234{ 234{
235 return __linvfs_writev(file, iov, IO_INVIS, nr_segs, ppos); 235 return __xfs_file_writev(file, iov, IO_INVIS, nr_segs, ppos);
236} 236}
237 237
238STATIC ssize_t 238STATIC ssize_t
239linvfs_sendfile( 239xfs_file_sendfile(
240 struct file *filp, 240 struct file *filp,
241 loff_t *ppos, 241 loff_t *ppos,
242 size_t count, 242 size_t count,
@@ -252,7 +252,7 @@ linvfs_sendfile(
252 252
253 253
254STATIC int 254STATIC int
255linvfs_open( 255xfs_file_open(
256 struct inode *inode, 256 struct inode *inode,
257 struct file *filp) 257 struct file *filp)
258{ 258{
@@ -269,7 +269,7 @@ linvfs_open(
269 269
270 270
271STATIC int 271STATIC int
272linvfs_release( 272xfs_file_release(
273 struct inode *inode, 273 struct inode *inode,
274 struct file *filp) 274 struct file *filp)
275{ 275{
@@ -283,7 +283,7 @@ linvfs_release(
283 283
284 284
285STATIC int 285STATIC int
286linvfs_fsync( 286xfs_file_fsync(
287 struct file *filp, 287 struct file *filp,
288 struct dentry *dentry, 288 struct dentry *dentry,
289 int datasync) 289 int datasync)
@@ -302,7 +302,7 @@ linvfs_fsync(
302} 302}
303 303
304/* 304/*
305 * linvfs_readdir maps to VOP_READDIR(). 305 * xfs_file_readdir maps to VOP_READDIR().
306 * We need to build a uio, cred, ... 306 * We need to build a uio, cred, ...
307 */ 307 */
308 308
@@ -311,7 +311,7 @@ linvfs_fsync(
311#ifdef CONFIG_XFS_DMAPI 311#ifdef CONFIG_XFS_DMAPI
312 312
313STATIC struct page * 313STATIC struct page *
314linvfs_filemap_nopage( 314xfs_vm_nopage(
315 struct vm_area_struct *area, 315 struct vm_area_struct *area,
316 unsigned long address, 316 unsigned long address,
317 int *type) 317 int *type)
@@ -334,7 +334,7 @@ linvfs_filemap_nopage(
334 334
335 335
336STATIC int 336STATIC int
337linvfs_readdir( 337xfs_file_readdir(
338 struct file *filp, 338 struct file *filp,
339 void *dirent, 339 void *dirent,
340 filldir_t filldir) 340 filldir_t filldir)
@@ -414,7 +414,7 @@ done:
414 414
415 415
416STATIC int 416STATIC int
417linvfs_file_mmap( 417xfs_file_mmap(
418 struct file *filp, 418 struct file *filp,
419 struct vm_area_struct *vma) 419 struct vm_area_struct *vma)
420{ 420{
@@ -423,11 +423,11 @@ linvfs_file_mmap(
423 vattr_t *vattr; 423 vattr_t *vattr;
424 int error; 424 int error;
425 425
426 vma->vm_ops = &linvfs_file_vm_ops; 426 vma->vm_ops = &xfs_file_vm_ops;
427 427
428#ifdef CONFIG_XFS_DMAPI 428#ifdef CONFIG_XFS_DMAPI
429 if (vp->v_vfsp->vfs_flag & VFS_DMI) { 429 if (vp->v_vfsp->vfs_flag & VFS_DMI) {
430 vma->vm_ops = &linvfs_dmapi_file_vm_ops; 430 vma->vm_ops = &xfs_dmapi_file_vm_ops;
431 } 431 }
432#endif /* CONFIG_XFS_DMAPI */ 432#endif /* CONFIG_XFS_DMAPI */
433 433
@@ -444,7 +444,7 @@ linvfs_file_mmap(
444 444
445 445
446STATIC long 446STATIC long
447linvfs_ioctl( 447xfs_file_ioctl(
448 struct file *filp, 448 struct file *filp,
449 unsigned int cmd, 449 unsigned int cmd,
450 unsigned long arg) 450 unsigned long arg)
@@ -466,7 +466,7 @@ linvfs_ioctl(
466} 466}
467 467
468STATIC long 468STATIC long
469linvfs_ioctl_invis( 469xfs_file_ioctl_invis(
470 struct file *filp, 470 struct file *filp,
471 unsigned int cmd, 471 unsigned int cmd,
472 unsigned long arg) 472 unsigned long arg)
@@ -491,7 +491,7 @@ linvfs_ioctl_invis(
491#ifdef CONFIG_XFS_DMAPI 491#ifdef CONFIG_XFS_DMAPI
492#ifdef HAVE_VMOP_MPROTECT 492#ifdef HAVE_VMOP_MPROTECT
493STATIC int 493STATIC int
494linvfs_mprotect( 494xfs_vm_mprotect(
495 struct vm_area_struct *vma, 495 struct vm_area_struct *vma,
496 unsigned int newflags) 496 unsigned int newflags)
497{ 497{
@@ -518,7 +518,7 @@ linvfs_mprotect(
518 * it back online. 518 * it back online.
519 */ 519 */
520STATIC int 520STATIC int
521linvfs_open_exec( 521xfs_file_open_exec(
522 struct inode *inode) 522 struct inode *inode)
523{ 523{
524 vnode_t *vp = LINVFS_GET_VP(inode); 524 vnode_t *vp = LINVFS_GET_VP(inode);
@@ -542,69 +542,69 @@ open_exec_out:
542} 542}
543#endif /* HAVE_FOP_OPEN_EXEC */ 543#endif /* HAVE_FOP_OPEN_EXEC */
544 544
545struct file_operations linvfs_file_operations = { 545struct file_operations xfs_file_operations = {
546 .llseek = generic_file_llseek, 546 .llseek = generic_file_llseek,
547 .read = do_sync_read, 547 .read = do_sync_read,
548 .write = do_sync_write, 548 .write = do_sync_write,
549 .readv = linvfs_readv, 549 .readv = xfs_file_readv,
550 .writev = linvfs_writev, 550 .writev = xfs_file_writev,
551 .aio_read = linvfs_aio_read, 551 .aio_read = xfs_file_aio_read,
552 .aio_write = linvfs_aio_write, 552 .aio_write = xfs_file_aio_write,
553 .sendfile = linvfs_sendfile, 553 .sendfile = xfs_file_sendfile,
554 .unlocked_ioctl = linvfs_ioctl, 554 .unlocked_ioctl = xfs_file_ioctl,
555#ifdef CONFIG_COMPAT 555#ifdef CONFIG_COMPAT
556 .compat_ioctl = linvfs_compat_ioctl, 556 .compat_ioctl = xfs_file_compat_ioctl,
557#endif 557#endif
558 .mmap = linvfs_file_mmap, 558 .mmap = xfs_file_mmap,
559 .open = linvfs_open, 559 .open = xfs_file_open,
560 .release = linvfs_release, 560 .release = xfs_file_release,
561 .fsync = linvfs_fsync, 561 .fsync = xfs_file_fsync,
562#ifdef HAVE_FOP_OPEN_EXEC 562#ifdef HAVE_FOP_OPEN_EXEC
563 .open_exec = linvfs_open_exec, 563 .open_exec = xfs_file_open_exec,
564#endif 564#endif
565}; 565};
566 566
567struct file_operations linvfs_invis_file_operations = { 567struct file_operations xfs_invis_file_operations = {
568 .llseek = generic_file_llseek, 568 .llseek = generic_file_llseek,
569 .read = do_sync_read, 569 .read = do_sync_read,
570 .write = do_sync_write, 570 .write = do_sync_write,
571 .readv = linvfs_readv_invis, 571 .readv = xfs_file_readv_invis,
572 .writev = linvfs_writev_invis, 572 .writev = xfs_file_writev_invis,
573 .aio_read = linvfs_aio_read_invis, 573 .aio_read = xfs_file_aio_read_invis,
574 .aio_write = linvfs_aio_write_invis, 574 .aio_write = xfs_file_aio_write_invis,
575 .sendfile = linvfs_sendfile, 575 .sendfile = xfs_file_sendfile,
576 .unlocked_ioctl = linvfs_ioctl_invis, 576 .unlocked_ioctl = xfs_file_ioctl_invis,
577#ifdef CONFIG_COMPAT 577#ifdef CONFIG_COMPAT
578 .compat_ioctl = linvfs_compat_invis_ioctl, 578 .compat_ioctl = xfs_file_compat_invis_ioctl,
579#endif 579#endif
580 .mmap = linvfs_file_mmap, 580 .mmap = xfs_file_mmap,
581 .open = linvfs_open, 581 .open = xfs_file_open,
582 .release = linvfs_release, 582 .release = xfs_file_release,
583 .fsync = linvfs_fsync, 583 .fsync = xfs_file_fsync,
584}; 584};
585 585
586 586
587struct file_operations linvfs_dir_operations = { 587struct file_operations xfs_dir_file_operations = {
588 .read = generic_read_dir, 588 .read = generic_read_dir,
589 .readdir = linvfs_readdir, 589 .readdir = xfs_file_readdir,
590 .unlocked_ioctl = linvfs_ioctl, 590 .unlocked_ioctl = xfs_file_ioctl,
591#ifdef CONFIG_COMPAT 591#ifdef CONFIG_COMPAT
592 .compat_ioctl = linvfs_compat_ioctl, 592 .compat_ioctl = xfs_file_compat_ioctl,
593#endif 593#endif
594 .fsync = linvfs_fsync, 594 .fsync = xfs_file_fsync,
595}; 595};
596 596
597static struct vm_operations_struct linvfs_file_vm_ops = { 597static struct vm_operations_struct xfs_file_vm_ops = {
598 .nopage = filemap_nopage, 598 .nopage = filemap_nopage,
599 .populate = filemap_populate, 599 .populate = filemap_populate,
600}; 600};
601 601
602#ifdef CONFIG_XFS_DMAPI 602#ifdef CONFIG_XFS_DMAPI
603static struct vm_operations_struct linvfs_dmapi_file_vm_ops = { 603static struct vm_operations_struct xfs_dmapi_file_vm_ops = {
604 .nopage = linvfs_filemap_nopage, 604 .nopage = xfs_vm_nopage,
605 .populate = filemap_populate, 605 .populate = filemap_populate,
606#ifdef HAVE_VMOP_MPROTECT 606#ifdef HAVE_VMOP_MPROTECT
607 .mprotect = linvfs_mprotect, 607 .mprotect = xfs_vm_mprotect,
608#endif 608#endif
609}; 609};
610#endif /* CONFIG_XFS_DMAPI */ 610#endif /* CONFIG_XFS_DMAPI */
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index f182721ec9a2..e435ad17419d 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -344,7 +344,7 @@ xfs_open_by_handle(
344 return -XFS_ERROR(-PTR_ERR(filp)); 344 return -XFS_ERROR(-PTR_ERR(filp));
345 } 345 }
346 if (inode->i_mode & S_IFREG) 346 if (inode->i_mode & S_IFREG)
347 filp->f_op = &linvfs_invis_file_operations; 347 filp->f_op = &xfs_invis_file_operations;
348 348
349 fd_install(new_fd, filp); 349 fd_install(new_fd, filp);
350 return new_fd; 350 return new_fd;
diff --git a/fs/xfs/linux-2.6/xfs_iops.h b/fs/xfs/linux-2.6/xfs_iops.h
index 6899a6b4a50a..8b5275e4b83e 100644
--- a/fs/xfs/linux-2.6/xfs_iops.h
+++ b/fs/xfs/linux-2.6/xfs_iops.h
@@ -22,9 +22,9 @@ extern struct inode_operations linvfs_file_inode_operations;
22extern struct inode_operations linvfs_dir_inode_operations; 22extern struct inode_operations linvfs_dir_inode_operations;
23extern struct inode_operations linvfs_symlink_inode_operations; 23extern struct inode_operations linvfs_symlink_inode_operations;
24 24
25extern struct file_operations linvfs_file_operations; 25extern struct file_operations xfs_file_operations;
26extern struct file_operations linvfs_invis_file_operations; 26extern struct file_operations xfs_dir_file_operations;
27extern struct file_operations linvfs_dir_operations; 27extern struct file_operations xfs_invis_file_operations;
28 28
29extern int xfs_ioctl(struct bhv_desc *, struct inode *, struct file *, 29extern int xfs_ioctl(struct bhv_desc *, struct inode *, struct file *,
30 int, unsigned int, void __user *); 30 int, unsigned int, void __user *);
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index fb76c53f9c43..9eac4b49a199 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -128,12 +128,12 @@ xfs_set_inodeops(
128 switch (inode->i_mode & S_IFMT) { 128 switch (inode->i_mode & S_IFMT) {
129 case S_IFREG: 129 case S_IFREG:
130 inode->i_op = &linvfs_file_inode_operations; 130 inode->i_op = &linvfs_file_inode_operations;
131 inode->i_fop = &linvfs_file_operations; 131 inode->i_fop = &xfs_file_operations;
132 inode->i_mapping->a_ops = &xfs_address_space_operations; 132 inode->i_mapping->a_ops = &xfs_address_space_operations;
133 break; 133 break;
134 case S_IFDIR: 134 case S_IFDIR:
135 inode->i_op = &linvfs_dir_inode_operations; 135 inode->i_op = &linvfs_dir_inode_operations;
136 inode->i_fop = &linvfs_dir_operations; 136 inode->i_fop = &xfs_dir_file_operations;
137 break; 137 break;
138 case S_IFLNK: 138 case S_IFLNK:
139 inode->i_op = &linvfs_symlink_inode_operations; 139 inode->i_op = &linvfs_symlink_inode_operations;