NFS - install nfsmount on nfs_mountq, for timeout handling.
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 16 Jul 2009 06:46:07 +0000 (23:46 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 16 Jul 2009 06:46:07 +0000 (23:46 -0700)
* This way the timeout callout can find all the requests.

sys/vfs/nfs/nfs_vfsops.c

index 7a2a45e..04f68d7 100644 (file)
@@ -995,6 +995,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
         * Lose the lock but keep the ref.
         */
        vn_unlock(*vpp);
+       TAILQ_INSERT_TAIL(&nfs_mountq, nmp, nm_entry);
 
        return (0);
 bad:
@@ -1049,6 +1050,7 @@ nfs_unmount(struct mount *mp, int mntflags)
 
        nfs_disconnect(nmp);
        FREE(nmp->nm_nam, M_SONAME);
+       TAILQ_REMOVE(&nfs_mountq, nmp, nm_entry);
 
        if ((nmp->nm_flag & NFSMNT_KERB) == 0)
                nfs_free_mount(nmp);