summaryrefslogtreecommitdiff
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-09 09:34:18 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-09 09:34:18 -0400
commit8b512d9a88875affe584bb3d2a7a235f84343b9e (patch)
tree80c46a675aeffaedd8d18e2bb6361768f4f4845a /fs/nfs/inode.c
parent5528f911b4c43a5de5da34bcbd7e3f2a62503617 (diff)
VFS: Remove dependency of ->umount_begin() call on MNT_FORCE
Allow filesystems to decide to perform pre-umount processing whether or not MNT_FORCE is set. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 9ff039f9a836..fda2b4966179 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -63,7 +63,7 @@ static struct inode *nfs_alloc_inode(struct super_block *sb);
static void nfs_destroy_inode(struct inode *);
static int nfs_write_inode(struct inode *,int);
static void nfs_clear_inode(struct inode *);
-static void nfs_umount_begin(struct super_block *);
+static void nfs_umount_begin(struct vfsmount *, int);
static int nfs_statfs(struct super_block *, struct kstatfs *);
static int nfs_show_options(struct seq_file *, struct vfsmount *);
static int nfs_show_stats(struct seq_file *, struct vfsmount *);
@@ -162,15 +162,19 @@ nfs_clear_inode(struct inode *inode)
BUG_ON(atomic_read(&nfsi->data_updates) != 0);
}
-void
-nfs_umount_begin(struct super_block *sb)
+static void nfs_umount_begin(struct vfsmount *vfsmnt, int flags)
{
- struct rpc_clnt *rpc = NFS_SB(sb)->client;
+ struct nfs_server *server;
+ struct rpc_clnt *rpc;
+ if (!(flags & MNT_FORCE))
+ return;
/* -EIO all pending I/O */
+ server = NFS_SB(vfsmnt->mnt_sb);
+ rpc = server->client;
if (!IS_ERR(rpc))
rpc_killall_tasks(rpc);
- rpc = NFS_SB(sb)->client_acl;
+ rpc = server->client_acl;
if (!IS_ERR(rpc))
rpc_killall_tasks(rpc);
}