summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfsclient
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2011-04-20 23:25:18 +0000
committerrmacklem <rmacklem@FreeBSD.org>2011-04-20 23:25:18 +0000
commit2d3aacf51384f95cdf3062b3eebbe41a8a97aaa7 (patch)
tree9660af1b2e70563bdcc3defb7bcf8ca1d3bf685f /sys/fs/nfsclient
parent238797d56490b1e92e8f08a44dba2a39dc38f2d3 (diff)
downloadFreeBSD-src-2d3aacf51384f95cdf3062b3eebbe41a8a97aaa7.zip
FreeBSD-src-2d3aacf51384f95cdf3062b3eebbe41a8a97aaa7.tar.gz
Add a check for VI_DOOMED at the beginning of nfscl_request()
so that it won't try and use vp->v_mount to do an RPC during a forced dismount. There needs to be at least one more kernel commit, plus a change to the umount(8) command before forced dismounts will work for the experimental NFS client. MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfsclient')
-rw-r--r--sys/fs/nfsclient/nfs_clport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c
index 2470a8c..be9b553 100644
--- a/sys/fs/nfsclient/nfs_clport.c
+++ b/sys/fs/nfsclient/nfs_clport.c
@@ -819,6 +819,8 @@ nfscl_request(struct nfsrv_descript *nd, struct vnode *vp, NFSPROC_T *p,
int ret, vers;
struct nfsmount *nmp;
+ if ((vp->v_iflag & VI_DOOMED) != 0)
+ return (EPERM);
nmp = VFSTONFS(vp->v_mount);
if (nd->nd_flag & ND_NFSV4)
vers = NFS_VER4;
OpenPOWER on IntegriCloud