Commit ade33956 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Stephen Lord

[XFS] remove VFS_DOUNMOUNT

SGI Modid: 2.5.x-xfs:slinx:140841a
parent 5cd86e5a
......@@ -32,48 +32,6 @@
#include <xfs.h>
/*
* Implementation for VFS_DOUNMOUNT.
*/
int
fs_dounmount(
bhv_desc_t *bdp,
int flags,
vnode_t *rootvp,
cred_t *cr)
{
struct vfs *vfsp = bhvtovfs(bdp);
bhv_desc_t *fbdp = vfsp->vfs_fbhv;
int error;
/*
* Wait for sync to finish and lock vfsp. This also sets the
* VFS_OFFLINE flag. Once we do this we can give up reference
* the root vnode which we hold to avoid the another unmount
* ripping the vfs out from under us before we get to lock it.
* The VFS_DOUNMOUNT calling convention is that the reference
* on the rot vnode is released whether the call succeeds or
* fails.
*/
if (rootvp)
VN_RELE(rootvp);
/*
* Now invoke SYNC and UNMOUNT ops, using the PVFS versions is
* OK since we already have a behavior lock as a result of
* being in VFS_DOUNMOUNT. It is necessary to do things this
* way since using the VFS versions would cause us to get the
* behavior lock twice which can cause deadlock as well as
* making the coding of vfs relocation unnecessarilty difficult
* by making relocations invoked by unmount occur in a different
* environment than those invoked by mount-update.
*/
PVFS_SYNC(fbdp, SYNC_ATTR|SYNC_DELWRI, cr, error);
if (error == 0)
PVFS_UNMOUNT(fbdp, flags, cr, error);
return error;
}
/*
* Stub for no-op vnode operations that return error status.
*/
......
......@@ -42,7 +42,6 @@ extern int fs_noerr(void);
extern int fs_nosys(void);
extern int fs_nodev(void);
extern void fs_noval(void);
extern int fs_dounmount(bhv_desc_t *, int, vnode_t *, struct cred *);
extern void fs_tosspages(bhv_desc_t *, xfs_off_t, xfs_off_t, int);
extern void fs_flushinval_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, int);
extern int fs_flush_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, uint64_t, int);
......
......@@ -766,7 +766,9 @@ linvfs_put_super(
vfs_t *vfsp = LINVFS_GET_VFS(sb);
int error;
VFS_DOUNMOUNT(vfsp, 0, NULL, NULL, error);
VFS_SYNC(vfsp, SYNC_ATTR|SYNC_DELWRI, NULL, error);
if (error == 0)
VFS_UNMOUNT(vfsp, 0, NULL, error);
if (error) {
printk("XFS unmount got error %d\n", error);
printk("%s: vfsp/0x%p left dangling!\n", __FUNCTION__, vfsp);
......
......@@ -75,9 +75,6 @@ typedef struct vfsops {
int (*vfs_mount)(struct vfs *, struct xfs_mount_args *,
struct cred *);
/* mount file system */
int (*vfs_dounmount)(bhv_desc_t *, int, struct vnode *,
struct cred *);
/* preparation and unmount */
int (*vfs_unmount)(bhv_desc_t *, int, struct cred *);
/* unmount file system */
int (*vfs_root)(bhv_desc_t *, struct vnode **);
......@@ -98,12 +95,6 @@ typedef struct vfsops {
int, char *, int);
} vfsops_t;
#define VFS_DOUNMOUNT(vfsp,f,vp,cr, rv) \
{ \
BHV_READ_LOCK(&(vfsp)->vfs_bh); \
rv = (*(VFS_FOPS(vfsp)->vfs_dounmount))((vfsp)->vfs_fbhv, f, vp, cr); \
BHV_READ_UNLOCK(&(vfsp)->vfs_bh); \
}
#define VFS_UNMOUNT(vfsp,f,cr, rv) \
{ \
BHV_READ_LOCK(&(vfsp)->vfs_bh); \
......
......@@ -1582,7 +1582,6 @@ xfs_vget(
vfsops_t xfs_vfsops = {
.vfs_mount = xfs_mount,
.vfs_dounmount = fs_dounmount,
.vfs_unmount = xfs_unmount,
.vfs_root = xfs_root,
.vfs_statvfs = xfs_statvfs,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment