diff options
author | Nathan Scott <nathans@sgi.com> | 2006-03-17 01:25:36 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-03-17 01:25:36 -0500 |
commit | ec86dc02fdc062d0d298814b1e78b482ab38caf7 (patch) | |
tree | 2746adfa5471f7026cdd5a9ba4c4853de6795256 /fs/xfs/linux-2.6/xfs_super.c | |
parent | 8867bc9bf0aed7181aa72c7c938c6ce830b75166 (diff) |
[XFS] Complete transition away from linvfs naming convention, finally.
SGI-PV: 947038
SGI-Modid: xfs-linux-melb:xfs-kern:25474a
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 52 |
1 files changed, 24 insertions, 28 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 352aa3d40c1f..d9d28a965bac 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -153,7 +153,7 @@ xfs_revalidate_inode( | |||
153 | vnode_t *vp, | 153 | vnode_t *vp, |
154 | xfs_inode_t *ip) | 154 | xfs_inode_t *ip) |
155 | { | 155 | { |
156 | struct inode *inode = LINVFS_GET_IP(vp); | 156 | struct inode *inode = vn_to_inode(vp); |
157 | 157 | ||
158 | inode->i_mode = ip->i_d.di_mode; | 158 | inode->i_mode = ip->i_d.di_mode; |
159 | inode->i_nlink = ip->i_d.di_nlink; | 159 | inode->i_nlink = ip->i_d.di_nlink; |
@@ -210,7 +210,7 @@ xfs_initialize_vnode( | |||
210 | int unlock) | 210 | int unlock) |
211 | { | 211 | { |
212 | xfs_inode_t *ip = XFS_BHVTOI(inode_bhv); | 212 | xfs_inode_t *ip = XFS_BHVTOI(inode_bhv); |
213 | struct inode *inode = LINVFS_GET_IP(vp); | 213 | struct inode *inode = vn_to_inode(vp); |
214 | 214 | ||
215 | if (!inode_bhv->bd_vobj) { | 215 | if (!inode_bhv->bd_vobj) { |
216 | vp->v_vfsp = bhvtovfs(bdp); | 216 | vp->v_vfsp = bhvtovfs(bdp); |
@@ -228,7 +228,7 @@ xfs_initialize_vnode( | |||
228 | if (ip->i_d.di_mode != 0 && unlock && (inode->i_state & I_NEW)) { | 228 | if (ip->i_d.di_mode != 0 && unlock && (inode->i_state & I_NEW)) { |
229 | xfs_revalidate_inode(XFS_BHVTOM(bdp), vp, ip); | 229 | xfs_revalidate_inode(XFS_BHVTOM(bdp), vp, ip); |
230 | xfs_set_inodeops(inode); | 230 | xfs_set_inodeops(inode); |
231 | 231 | ||
232 | ip->i_flags &= ~XFS_INEW; | 232 | ip->i_flags &= ~XFS_INEW; |
233 | barrier(); | 233 | barrier(); |
234 | 234 | ||
@@ -340,14 +340,14 @@ xfs_fs_alloc_inode( | |||
340 | vp = kmem_zone_alloc(xfs_vnode_zone, KM_SLEEP); | 340 | vp = kmem_zone_alloc(xfs_vnode_zone, KM_SLEEP); |
341 | if (unlikely(!vp)) | 341 | if (unlikely(!vp)) |
342 | return NULL; | 342 | return NULL; |
343 | return LINVFS_GET_IP(vp); | 343 | return vn_to_inode(vp); |
344 | } | 344 | } |
345 | 345 | ||
346 | STATIC void | 346 | STATIC void |
347 | xfs_fs_destroy_inode( | 347 | xfs_fs_destroy_inode( |
348 | struct inode *inode) | 348 | struct inode *inode) |
349 | { | 349 | { |
350 | kmem_zone_free(xfs_vnode_zone, LINVFS_GET_VP(inode)); | 350 | kmem_zone_free(xfs_vnode_zone, vn_from_inode(inode)); |
351 | } | 351 | } |
352 | 352 | ||
353 | STATIC void | 353 | STATIC void |
@@ -358,7 +358,7 @@ xfs_fs_inode_init_once( | |||
358 | { | 358 | { |
359 | if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == | 359 | if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == |
360 | SLAB_CTOR_CONSTRUCTOR) | 360 | SLAB_CTOR_CONSTRUCTOR) |
361 | inode_init_once(LINVFS_GET_IP((vnode_t *)vnode)); | 361 | inode_init_once(vn_to_inode((vnode_t *)vnode)); |
362 | } | 362 | } |
363 | 363 | ||
364 | STATIC int | 364 | STATIC int |
@@ -409,7 +409,7 @@ xfs_fs_write_inode( | |||
409 | struct inode *inode, | 409 | struct inode *inode, |
410 | int sync) | 410 | int sync) |
411 | { | 411 | { |
412 | vnode_t *vp = LINVFS_GET_VP(inode); | 412 | vnode_t *vp = vn_from_inode(inode); |
413 | int error = 0, flags = FLUSH_INODE; | 413 | int error = 0, flags = FLUSH_INODE; |
414 | 414 | ||
415 | if (vp) { | 415 | if (vp) { |
@@ -432,7 +432,7 @@ STATIC void | |||
432 | xfs_fs_clear_inode( | 432 | xfs_fs_clear_inode( |
433 | struct inode *inode) | 433 | struct inode *inode) |
434 | { | 434 | { |
435 | vnode_t *vp = LINVFS_GET_VP(inode); | 435 | vnode_t *vp = vn_from_inode(inode); |
436 | int error, cache; | 436 | int error, cache; |
437 | 437 | ||
438 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); | 438 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); |
@@ -511,7 +511,7 @@ void | |||
511 | xfs_flush_inode( | 511 | xfs_flush_inode( |
512 | xfs_inode_t *ip) | 512 | xfs_inode_t *ip) |
513 | { | 513 | { |
514 | struct inode *inode = LINVFS_GET_IP(XFS_ITOV(ip)); | 514 | struct inode *inode = vn_to_inode(XFS_ITOV(ip)); |
515 | struct vfs *vfs = XFS_MTOVFS(ip->i_mount); | 515 | struct vfs *vfs = XFS_MTOVFS(ip->i_mount); |
516 | 516 | ||
517 | igrab(inode); | 517 | igrab(inode); |
@@ -536,7 +536,7 @@ void | |||
536 | xfs_flush_device( | 536 | xfs_flush_device( |
537 | xfs_inode_t *ip) | 537 | xfs_inode_t *ip) |
538 | { | 538 | { |
539 | struct inode *inode = LINVFS_GET_IP(XFS_ITOV(ip)); | 539 | struct inode *inode = vn_to_inode(XFS_ITOV(ip)); |
540 | struct vfs *vfs = XFS_MTOVFS(ip->i_mount); | 540 | struct vfs *vfs = XFS_MTOVFS(ip->i_mount); |
541 | 541 | ||
542 | igrab(inode); | 542 | igrab(inode); |
@@ -630,7 +630,7 @@ STATIC void | |||
630 | xfs_fs_put_super( | 630 | xfs_fs_put_super( |
631 | struct super_block *sb) | 631 | struct super_block *sb) |
632 | { | 632 | { |
633 | vfs_t *vfsp = LINVFS_GET_VFS(sb); | 633 | vfs_t *vfsp = vfs_from_sb(sb); |
634 | int error; | 634 | int error; |
635 | 635 | ||
636 | xfs_fs_stop_syncd(vfsp); | 636 | xfs_fs_stop_syncd(vfsp); |
@@ -650,7 +650,7 @@ STATIC void | |||
650 | xfs_fs_write_super( | 650 | xfs_fs_write_super( |
651 | struct super_block *sb) | 651 | struct super_block *sb) |
652 | { | 652 | { |
653 | vfs_t *vfsp = LINVFS_GET_VFS(sb); | 653 | vfs_t *vfsp = vfs_from_sb(sb); |
654 | int error; | 654 | int error; |
655 | 655 | ||
656 | if (sb->s_flags & MS_RDONLY) { | 656 | if (sb->s_flags & MS_RDONLY) { |
@@ -667,7 +667,7 @@ xfs_fs_sync_super( | |||
667 | struct super_block *sb, | 667 | struct super_block *sb, |
668 | int wait) | 668 | int wait) |
669 | { | 669 | { |
670 | vfs_t *vfsp = LINVFS_GET_VFS(sb); | 670 | vfs_t *vfsp = vfs_from_sb(sb); |
671 | int error; | 671 | int error; |
672 | int flags = SYNC_FSDATA; | 672 | int flags = SYNC_FSDATA; |
673 | 673 | ||
@@ -706,7 +706,7 @@ xfs_fs_statfs( | |||
706 | struct super_block *sb, | 706 | struct super_block *sb, |
707 | struct kstatfs *statp) | 707 | struct kstatfs *statp) |
708 | { | 708 | { |
709 | vfs_t *vfsp = LINVFS_GET_VFS(sb); | 709 | vfs_t *vfsp = vfs_from_sb(sb); |
710 | int error; | 710 | int error; |
711 | 711 | ||
712 | VFS_STATVFS(vfsp, statp, NULL, error); | 712 | VFS_STATVFS(vfsp, statp, NULL, error); |
@@ -719,7 +719,7 @@ xfs_fs_remount( | |||
719 | int *flags, | 719 | int *flags, |
720 | char *options) | 720 | char *options) |
721 | { | 721 | { |
722 | vfs_t *vfsp = LINVFS_GET_VFS(sb); | 722 | vfs_t *vfsp = vfs_from_sb(sb); |
723 | struct xfs_mount_args *args = xfs_args_allocate(sb); | 723 | struct xfs_mount_args *args = xfs_args_allocate(sb); |
724 | int error; | 724 | int error; |
725 | 725 | ||
@@ -734,7 +734,7 @@ STATIC void | |||
734 | xfs_fs_lockfs( | 734 | xfs_fs_lockfs( |
735 | struct super_block *sb) | 735 | struct super_block *sb) |
736 | { | 736 | { |
737 | VFS_FREEZE(LINVFS_GET_VFS(sb)); | 737 | VFS_FREEZE(vfs_from_sb(sb)); |
738 | } | 738 | } |
739 | 739 | ||
740 | STATIC int | 740 | STATIC int |
@@ -742,7 +742,7 @@ xfs_fs_show_options( | |||
742 | struct seq_file *m, | 742 | struct seq_file *m, |
743 | struct vfsmount *mnt) | 743 | struct vfsmount *mnt) |
744 | { | 744 | { |
745 | struct vfs *vfsp = LINVFS_GET_VFS(mnt->mnt_sb); | 745 | struct vfs *vfsp = vfs_from_sb(mnt->mnt_sb); |
746 | int error; | 746 | int error; |
747 | 747 | ||
748 | VFS_SHOWARGS(vfsp, m, error); | 748 | VFS_SHOWARGS(vfsp, m, error); |
@@ -754,7 +754,7 @@ xfs_fs_quotasync( | |||
754 | struct super_block *sb, | 754 | struct super_block *sb, |
755 | int type) | 755 | int type) |
756 | { | 756 | { |
757 | struct vfs *vfsp = LINVFS_GET_VFS(sb); | 757 | struct vfs *vfsp = vfs_from_sb(sb); |
758 | int error; | 758 | int error; |
759 | 759 | ||
760 | VFS_QUOTACTL(vfsp, Q_XQUOTASYNC, 0, (caddr_t)NULL, error); | 760 | VFS_QUOTACTL(vfsp, Q_XQUOTASYNC, 0, (caddr_t)NULL, error); |
@@ -766,7 +766,7 @@ xfs_fs_getxstate( | |||
766 | struct super_block *sb, | 766 | struct super_block *sb, |
767 | struct fs_quota_stat *fqs) | 767 | struct fs_quota_stat *fqs) |
768 | { | 768 | { |
769 | struct vfs *vfsp = LINVFS_GET_VFS(sb); | 769 | struct vfs *vfsp = vfs_from_sb(sb); |
770 | int error; | 770 | int error; |
771 | 771 | ||
772 | VFS_QUOTACTL(vfsp, Q_XGETQSTAT, 0, (caddr_t)fqs, error); | 772 | VFS_QUOTACTL(vfsp, Q_XGETQSTAT, 0, (caddr_t)fqs, error); |
@@ -779,7 +779,7 @@ xfs_fs_setxstate( | |||
779 | unsigned int flags, | 779 | unsigned int flags, |
780 | int op) | 780 | int op) |
781 | { | 781 | { |
782 | struct vfs *vfsp = LINVFS_GET_VFS(sb); | 782 | struct vfs *vfsp = vfs_from_sb(sb); |
783 | int error; | 783 | int error; |
784 | 784 | ||
785 | VFS_QUOTACTL(vfsp, op, 0, (caddr_t)&flags, error); | 785 | VFS_QUOTACTL(vfsp, op, 0, (caddr_t)&flags, error); |
@@ -793,7 +793,7 @@ xfs_fs_getxquota( | |||
793 | qid_t id, | 793 | qid_t id, |
794 | struct fs_disk_quota *fdq) | 794 | struct fs_disk_quota *fdq) |
795 | { | 795 | { |
796 | struct vfs *vfsp = LINVFS_GET_VFS(sb); | 796 | struct vfs *vfsp = vfs_from_sb(sb); |
797 | int error, getmode; | 797 | int error, getmode; |
798 | 798 | ||
799 | getmode = (type == USRQUOTA) ? Q_XGETQUOTA : | 799 | getmode = (type == USRQUOTA) ? Q_XGETQUOTA : |
@@ -809,7 +809,7 @@ xfs_fs_setxquota( | |||
809 | qid_t id, | 809 | qid_t id, |
810 | struct fs_disk_quota *fdq) | 810 | struct fs_disk_quota *fdq) |
811 | { | 811 | { |
812 | struct vfs *vfsp = LINVFS_GET_VFS(sb); | 812 | struct vfs *vfsp = vfs_from_sb(sb); |
813 | int error, setmode; | 813 | int error, setmode; |
814 | 814 | ||
815 | setmode = (type == USRQUOTA) ? Q_XSETQLIM : | 815 | setmode = (type == USRQUOTA) ? Q_XSETQLIM : |
@@ -825,15 +825,11 @@ xfs_fs_fill_super( | |||
825 | int silent) | 825 | int silent) |
826 | { | 826 | { |
827 | vnode_t *rootvp; | 827 | vnode_t *rootvp; |
828 | struct vfs *vfsp = vfs_allocate(); | 828 | struct vfs *vfsp = vfs_allocate(sb); |
829 | struct xfs_mount_args *args = xfs_args_allocate(sb); | 829 | struct xfs_mount_args *args = xfs_args_allocate(sb); |
830 | struct kstatfs statvfs; | 830 | struct kstatfs statvfs; |
831 | int error, error2; | 831 | int error, error2; |
832 | 832 | ||
833 | vfsp->vfs_super = sb; | ||
834 | LINVFS_SET_VFS(sb, vfsp); | ||
835 | if (sb->s_flags & MS_RDONLY) | ||
836 | vfsp->vfs_flag |= VFS_RDONLY; | ||
837 | bhv_insert_all_vfsops(vfsp); | 833 | bhv_insert_all_vfsops(vfsp); |
838 | 834 | ||
839 | VFS_PARSEARGS(vfsp, (char *)data, args, 0, error); | 835 | VFS_PARSEARGS(vfsp, (char *)data, args, 0, error); |
@@ -871,7 +867,7 @@ xfs_fs_fill_super( | |||
871 | if (error) | 867 | if (error) |
872 | goto fail_unmount; | 868 | goto fail_unmount; |
873 | 869 | ||
874 | sb->s_root = d_alloc_root(LINVFS_GET_IP(rootvp)); | 870 | sb->s_root = d_alloc_root(vn_to_inode(rootvp)); |
875 | if (!sb->s_root) { | 871 | if (!sb->s_root) { |
876 | error = ENOMEM; | 872 | error = ENOMEM; |
877 | goto fail_vnrele; | 873 | goto fail_vnrele; |