aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/Makefile1
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c5
-rw-r--r--fs/xfs/xfs_mount.c10
-rw-r--r--fs/xfs/xfs_mount.h1
-rw-r--r--fs/xfs/xfs_vfsops.c83
5 files changed, 10 insertions, 90 deletions
diff --git a/fs/xfs/Makefile b/fs/xfs/Makefile
index 51b87de97f87..a5a9ef0ce843 100644
--- a/fs/xfs/Makefile
+++ b/fs/xfs/Makefile
@@ -85,7 +85,6 @@ xfs-y += xfs_alloc.o \
85 xfs_trans_inode.o \ 85 xfs_trans_inode.o \
86 xfs_trans_item.o \ 86 xfs_trans_item.o \
87 xfs_utils.o \ 87 xfs_utils.o \
88 xfs_vfsops.o \
89 xfs_vnodeops.o \ 88 xfs_vnodeops.o \
90 xfs_rw.o \ 89 xfs_rw.o \
91 xfs_dmops.o \ 90 xfs_dmops.o \
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index c4f788e11197..4ebbd6820e7f 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -1043,7 +1043,6 @@ xfs_fs_put_super(
1043 struct xfs_mount *mp = XFS_M(sb); 1043 struct xfs_mount *mp = XFS_M(sb);
1044 struct xfs_inode *rip = mp->m_rootip; 1044 struct xfs_inode *rip = mp->m_rootip;
1045 int unmount_event_flags = 0; 1045 int unmount_event_flags = 0;
1046 int error;
1047 1046
1048 xfs_syncd_stop(mp); 1047 xfs_syncd_stop(mp);
1049 xfs_sync_inodes(mp, SYNC_ATTR|SYNC_DELWRI); 1048 xfs_sync_inodes(mp, SYNC_ATTR|SYNC_DELWRI);
@@ -1071,8 +1070,6 @@ xfs_fs_put_super(
1071 xfs_filestream_unmount(mp); 1070 xfs_filestream_unmount(mp);
1072 1071
1073 XFS_bflush(mp->m_ddev_targp); 1072 XFS_bflush(mp->m_ddev_targp);
1074 error = xfs_unmount_flush(mp, 0);
1075 WARN_ON(error);
1076 1073
1077 if (mp->m_flags & XFS_MOUNT_DMAPI) { 1074 if (mp->m_flags & XFS_MOUNT_DMAPI) {
1078 XFS_SEND_UNMOUNT(mp, rip, DM_RIGHT_NULL, 0, 0, 1075 XFS_SEND_UNMOUNT(mp, rip, DM_RIGHT_NULL, 0, 0,
@@ -1535,8 +1532,6 @@ xfs_fs_fill_super(
1535 xfs_filestream_unmount(mp); 1532 xfs_filestream_unmount(mp);
1536 1533
1537 XFS_bflush(mp->m_ddev_targp); 1534 XFS_bflush(mp->m_ddev_targp);
1538 error = xfs_unmount_flush(mp, 0);
1539 WARN_ON(error);
1540 1535
1541 xfs_unmountfs(mp); 1536 xfs_unmountfs(mp);
1542 goto out_free_sb; 1537 goto out_free_sb;
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 1672ff56a009..3c97c6463a4e 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1220,6 +1220,16 @@ xfs_unmountfs(
1220 __uint64_t resblks; 1220 __uint64_t resblks;
1221 int error; 1221 int error;
1222 1222
1223 /*
1224 * Release dquot that rootinode, rbmino and rsumino might be holding,
1225 * and release the quota inodes.
1226 */
1227 XFS_QM_UNMOUNT(mp);
1228
1229 if (mp->m_rbmip)
1230 IRELE(mp->m_rbmip);
1231 if (mp->m_rsumip)
1232 IRELE(mp->m_rsumip);
1223 IRELE(mp->m_rootip); 1233 IRELE(mp->m_rootip);
1224 1234
1225 /* 1235 /*
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 4f64fd160cc1..ae5da88ace20 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -509,7 +509,6 @@ extern void xfs_mountfs_check_barriers(xfs_mount_t *mp);
509 509
510extern void xfs_unmountfs(xfs_mount_t *); 510extern void xfs_unmountfs(xfs_mount_t *);
511extern int xfs_unmountfs_writesb(xfs_mount_t *); 511extern int xfs_unmountfs_writesb(xfs_mount_t *);
512extern int xfs_unmount_flush(xfs_mount_t *, int);
513extern int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int64_t, int); 512extern int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int64_t, int);
514extern int xfs_mod_incore_sb_unlocked(xfs_mount_t *, xfs_sb_field_t, 513extern int xfs_mod_incore_sb_unlocked(xfs_mount_t *, xfs_sb_field_t,
515 int64_t, int); 514 int64_t, int);
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
deleted file mode 100644
index 559fb8d51084..000000000000
--- a/fs/xfs/xfs_vfsops.c
+++ /dev/null
@@ -1,83 +0,0 @@
1/*
2 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18#include "xfs.h"
19#include "xfs_fs.h"
20#include "xfs_types.h"
21#include "xfs_bit.h"
22#include "xfs_log.h"
23#include "xfs_inum.h"
24#include "xfs_trans.h"
25#include "xfs_sb.h"
26#include "xfs_ag.h"
27#include "xfs_dir2.h"
28#include "xfs_dmapi.h"
29#include "xfs_mount.h"
30#include "xfs_da_btree.h"
31#include "xfs_bmap_btree.h"
32#include "xfs_ialloc_btree.h"
33#include "xfs_alloc_btree.h"
34#include "xfs_dir2_sf.h"
35#include "xfs_attr_sf.h"
36#include "xfs_dinode.h"
37#include "xfs_inode.h"
38#include "xfs_inode_item.h"
39#include "xfs_btree.h"
40#include "xfs_alloc.h"
41#include "xfs_ialloc.h"
42#include "xfs_quota.h"
43#include "xfs_error.h"
44#include "xfs_bmap.h"
45#include "xfs_rw.h"
46#include "xfs_buf_item.h"
47#include "xfs_log_priv.h"
48#include "xfs_dir2_trace.h"
49#include "xfs_extfree_item.h"
50#include "xfs_acl.h"
51#include "xfs_attr.h"
52#include "xfs_mru_cache.h"
53#include "xfs_filestream.h"
54#include "xfs_fsops.h"
55#include "xfs_vnodeops.h"
56#include "xfs_utils.h"
57#include "xfs_sync.h"
58
59
60/*
61 * xfs_unmount_flush implements a set of flush operation on special
62 * inodes, which are needed as a separate set of operations so that
63 * they can be called as part of relocation process.
64 */
65int
66xfs_unmount_flush(
67 xfs_mount_t *mp, /* Mount structure we are getting
68 rid of. */
69 int relocation) /* Called from vfs relocation. */
70{
71 /*
72 * Release dquot that rootinode, rbmino and rsumino might be holding,
73 * flush and purge the quota inodes.
74 */
75 XFS_QM_UNMOUNT(mp);
76
77 if (mp->m_rbmip)
78 IRELE(mp->m_rbmip);
79 if (mp->m_rsumip)
80 IRELE(mp->m_rsumip);
81
82 return 0;
83}