aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_super.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-08-30 03:20:39 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-10-15 21:44:08 -0400
commit745f691912b700ac98607b525f3c892204c7f12f (patch)
tree4988bdf45dec4bc9bffd432fc3e521b73836172f /fs/xfs/linux-2.6/xfs_super.c
parent48c872a9f3ec4cdc37801aae9ef16c80026503ea (diff)
[XFS] call common xfs vfs-level helpers directly and remove vfs operations
Also remove the now dead behavior code. SGI-PV: 969608 SGI-Modid: xfs-linux-melb:xfs-kern:29505a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 0cb149ad65c..24bc0afb003 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -47,6 +47,7 @@
47#include "xfs_buf_item.h" 47#include "xfs_buf_item.h"
48#include "xfs_utils.h" 48#include "xfs_utils.h"
49#include "xfs_vnodeops.h" 49#include "xfs_vnodeops.h"
50#include "xfs_vfsops.h"
50#include "xfs_version.h" 51#include "xfs_version.h"
51 52
52#include <linux/namei.h> 53#include <linux/namei.h>
@@ -204,8 +205,7 @@ void
204xfs_initialize_vnode( 205xfs_initialize_vnode(
205 struct xfs_mount *mp, 206 struct xfs_mount *mp,
206 bhv_vnode_t *vp, 207 bhv_vnode_t *vp,
207 struct xfs_inode *ip, 208 struct xfs_inode *ip)
208 int unlock)
209{ 209{
210 struct inode *inode = vn_to_inode(vp); 210 struct inode *inode = vn_to_inode(vp);
211 211
@@ -221,7 +221,7 @@ xfs_initialize_vnode(
221 * second time once the inode is properly set up, and then we can 221 * second time once the inode is properly set up, and then we can
222 * finish our work. 222 * finish our work.
223 */ 223 */
224 if (ip->i_d.di_mode != 0 && unlock && (inode->i_state & I_NEW)) { 224 if (ip->i_d.di_mode != 0 && (inode->i_state & I_NEW)) {
225 xfs_revalidate_inode(mp, vp, ip); 225 xfs_revalidate_inode(mp, vp, ip);
226 xfs_set_inodeops(inode); 226 xfs_set_inodeops(inode);
227 227
@@ -535,9 +535,8 @@ vfs_sync_worker(
535 int error; 535 int error;
536 536
537 if (!(vfsp->vfs_flag & VFS_RDONLY)) 537 if (!(vfsp->vfs_flag & VFS_RDONLY))
538 error = bhv_vfs_sync(vfsp, SYNC_FSDATA | SYNC_BDFLUSH | \ 538 error = xfs_sync(XFS_VFSTOM(vfsp), SYNC_FSDATA | SYNC_BDFLUSH | \
539 SYNC_ATTR | SYNC_REFCACHE | SYNC_SUPER, 539 SYNC_ATTR | SYNC_REFCACHE | SYNC_SUPER);
540 NULL);
541 vfsp->vfs_sync_seq++; 540 vfsp->vfs_sync_seq++;
542 wake_up(&vfsp->vfs_wait_single_sync_task); 541 wake_up(&vfsp->vfs_wait_single_sync_task);
543} 542}
@@ -614,11 +613,12 @@ xfs_fs_put_super(
614 struct super_block *sb) 613 struct super_block *sb)
615{ 614{
616 bhv_vfs_t *vfsp = vfs_from_sb(sb); 615 bhv_vfs_t *vfsp = vfs_from_sb(sb);
616 struct xfs_mount *mp = XFS_M(sb);
617 int error; 617 int error;
618 618
619 xfs_fs_stop_syncd(vfsp); 619 xfs_fs_stop_syncd(vfsp);
620 bhv_vfs_sync(vfsp, SYNC_ATTR | SYNC_DELWRI, NULL); 620 xfs_sync(mp, SYNC_ATTR | SYNC_DELWRI);
621 error = bhv_vfs_unmount(vfsp, 0, NULL); 621 error = xfs_unmount(mp, 0, NULL);
622 if (error) { 622 if (error) {
623 printk("XFS: unmount got error=%d\n", error); 623 printk("XFS: unmount got error=%d\n", error);
624 printk("%s: vfs=0x%p left dangling!\n", __FUNCTION__, vfsp); 624 printk("%s: vfs=0x%p left dangling!\n", __FUNCTION__, vfsp);
@@ -632,7 +632,7 @@ xfs_fs_write_super(
632 struct super_block *sb) 632 struct super_block *sb)
633{ 633{
634 if (!(sb->s_flags & MS_RDONLY)) 634 if (!(sb->s_flags & MS_RDONLY))
635 bhv_vfs_sync(vfs_from_sb(sb), SYNC_FSDATA, NULL); 635 xfs_sync(XFS_M(sb), SYNC_FSDATA);
636 sb->s_dirt = 0; 636 sb->s_dirt = 0;
637} 637}
638 638
@@ -642,6 +642,7 @@ xfs_fs_sync_super(
642 int wait) 642 int wait)
643{ 643{
644 bhv_vfs_t *vfsp = vfs_from_sb(sb); 644 bhv_vfs_t *vfsp = vfs_from_sb(sb);
645 struct xfs_mount *mp = XFS_M(sb);
645 int error; 646 int error;
646 int flags; 647 int flags;
647 648
@@ -658,7 +659,7 @@ xfs_fs_sync_super(
658 } else 659 } else
659 flags = SYNC_FSDATA | (wait ? SYNC_WAIT : 0); 660 flags = SYNC_FSDATA | (wait ? SYNC_WAIT : 0);
660 661
661 error = bhv_vfs_sync(vfsp, flags, NULL); 662 error = xfs_sync(mp, flags);
662 sb->s_dirt = 0; 663 sb->s_dirt = 0;
663 664
664 if (unlikely(laptop_mode)) { 665 if (unlikely(laptop_mode)) {
@@ -688,7 +689,7 @@ xfs_fs_statfs(
688 struct dentry *dentry, 689 struct dentry *dentry,
689 struct kstatfs *statp) 690 struct kstatfs *statp)
690{ 691{
691 return -bhv_vfs_statvfs(vfs_from_sb(dentry->d_sb), statp, 692 return -xfs_statvfs(XFS_M(dentry->d_sb), statp,
692 vn_from_inode(dentry->d_inode)); 693 vn_from_inode(dentry->d_inode));
693} 694}
694 695
@@ -698,13 +699,13 @@ xfs_fs_remount(
698 int *flags, 699 int *flags,
699 char *options) 700 char *options)
700{ 701{
701 bhv_vfs_t *vfsp = vfs_from_sb(sb); 702 struct xfs_mount *mp = XFS_M(sb);
702 struct xfs_mount_args *args = xfs_args_allocate(sb, 0); 703 struct xfs_mount_args *args = xfs_args_allocate(sb, 0);
703 int error; 704 int error;
704 705
705 error = bhv_vfs_parseargs(vfsp, options, args, 1); 706 error = xfs_parseargs(mp, options, args, 1);
706 if (!error) 707 if (!error)
707 error = bhv_vfs_mntupdate(vfsp, flags, args); 708 error = xfs_mntupdate(mp, flags, args);
708 kmem_free(args, sizeof(*args)); 709 kmem_free(args, sizeof(*args));
709 return -error; 710 return -error;
710} 711}
@@ -713,7 +714,7 @@ STATIC void
713xfs_fs_lockfs( 714xfs_fs_lockfs(
714 struct super_block *sb) 715 struct super_block *sb)
715{ 716{
716 bhv_vfs_freeze(vfs_from_sb(sb)); 717 xfs_freeze(XFS_M(sb));
717} 718}
718 719
719STATIC int 720STATIC int
@@ -721,7 +722,7 @@ xfs_fs_show_options(
721 struct seq_file *m, 722 struct seq_file *m,
722 struct vfsmount *mnt) 723 struct vfsmount *mnt)
723{ 724{
724 return -bhv_vfs_showargs(vfs_from_sb(mnt->mnt_sb), m); 725 return -xfs_showargs(XFS_M(mnt->mnt_sb), m);
725} 726}
726 727
727STATIC int 728STATIC int
@@ -783,30 +784,29 @@ xfs_fs_fill_super(
783{ 784{
784 struct inode *rootvp; 785 struct inode *rootvp;
785 struct bhv_vfs *vfsp = vfs_allocate(sb); 786 struct bhv_vfs *vfsp = vfs_allocate(sb);
787 struct xfs_mount *mp = NULL;
786 struct xfs_mount_args *args = xfs_args_allocate(sb, silent); 788 struct xfs_mount_args *args = xfs_args_allocate(sb, silent);
787 struct kstatfs statvfs; 789 struct kstatfs statvfs;
788 int error; 790 int error;
789 791
790 bhv_insert_all_vfsops(vfsp); 792 mp = xfs_mount_init();
793 mp->m_vfsp = vfsp;
794 vfsp->vfs_mount = mp;
791 795
792 error = bhv_vfs_parseargs(vfsp, (char *)data, args, 0); 796 error = xfs_parseargs(mp, (char *)data, args, 0);
793 if (error) { 797 if (error)
794 bhv_remove_all_vfsops(vfsp, 1);
795 goto fail_vfsop; 798 goto fail_vfsop;
796 }
797 799
798 sb_min_blocksize(sb, BBSIZE); 800 sb_min_blocksize(sb, BBSIZE);
799 sb->s_export_op = &xfs_export_operations; 801 sb->s_export_op = &xfs_export_operations;
800 sb->s_qcop = &xfs_quotactl_operations; 802 sb->s_qcop = &xfs_quotactl_operations;
801 sb->s_op = &xfs_super_operations; 803 sb->s_op = &xfs_super_operations;
802 804
803 error = bhv_vfs_mount(vfsp, args, NULL); 805 error = xfs_mount(mp, args, NULL);
804 if (error) { 806 if (error)
805 bhv_remove_all_vfsops(vfsp, 1);
806 goto fail_vfsop; 807 goto fail_vfsop;
807 }
808 808
809 error = bhv_vfs_statvfs(vfsp, &statvfs, NULL); 809 error = xfs_statvfs(mp, &statvfs, NULL);
810 if (error) 810 if (error)
811 goto fail_unmount; 811 goto fail_unmount;
812 812
@@ -818,7 +818,7 @@ xfs_fs_fill_super(
818 sb->s_time_gran = 1; 818 sb->s_time_gran = 1;
819 set_posix_acl_flag(sb); 819 set_posix_acl_flag(sb);
820 820
821 error = bhv_vfs_root(vfsp, &rootvp); 821 error = xfs_root(mp, &rootvp);
822 if (error) 822 if (error)
823 goto fail_unmount; 823 goto fail_unmount;
824 824
@@ -848,7 +848,7 @@ fail_vnrele:
848 } 848 }
849 849
850fail_unmount: 850fail_unmount:
851 bhv_vfs_unmount(vfsp, 0, NULL); 851 xfs_unmount(mp, 0, NULL);
852 852
853fail_vfsop: 853fail_vfsop:
854 vfs_deallocate(vfsp); 854 vfs_deallocate(vfsp);