]> err.no Git - linux-2.6/commitdiff
NFS: Re-enable forced umounts
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 5 Jun 2007 23:13:47 +0000 (19:13 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 11 Jul 2007 03:40:25 +0000 (23:40 -0400)
They disappeared some time around 2.6.18.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/super.c

index ca20d3cc260908b485f7d3bf4279ad3d718d97c4..14c7923697d2521af994eecc1819d857988d375d 100644 (file)
@@ -430,7 +430,20 @@ static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt)
  */
 static void nfs_umount_begin(struct vfsmount *vfsmnt, int flags)
 {
+       struct nfs_server *server = NFS_SB(vfsmnt->mnt_sb);
+       struct rpc_clnt *rpc;
+
        shrink_submounts(vfsmnt, &nfs_automount_list);
+
+       if (!(flags & MNT_FORCE))
+               return;
+       /* -EIO all pending I/O */
+       rpc = server->client_acl;
+       if (!IS_ERR(rpc))
+               rpc_killall_tasks(rpc);
+       rpc = server->client;
+       if (!IS_ERR(rpc))
+               rpc_killall_tasks(rpc);
 }
 
 /*