diff options
author | kib <kib@FreeBSD.org> | 2012-06-21 09:26:06 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2012-06-21 09:26:06 +0000 |
commit | 09b19ea8ee1677da4f319832b8120909dd3c1481 (patch) | |
tree | c1da8205123c99d5a705fee979e805557a7c12df /sys/fs/nfsclient | |
parent | 7e14b6838bca79d6c18eb00c4fe8c0a3e3b066ff (diff) | |
download | FreeBSD-src-09b19ea8ee1677da4f319832b8120909dd3c1481.zip FreeBSD-src-09b19ea8ee1677da4f319832b8120909dd3c1481.tar.gz |
Enable deadlock avoidance code for NFS client.
MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfsclient')
-rw-r--r-- | sys/fs/nfsclient/nfs_clbio.c | 4 | ||||
-rw-r--r-- | sys/fs/nfsclient/nfs_clvfsops.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 4369912..71286e3 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -722,7 +722,7 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) }; if (n > 0) { - error = uiomove(bp->b_data + on, (int)n, uio); + error = vn_io_fault_uiomove(bp->b_data + on, (int)n, uio); } if (vp->v_type == VLNK) n = 0; @@ -1203,7 +1203,7 @@ again: } local_resid = uio->uio_resid; - error = uiomove((char *)bp->b_data + on, n, uio); + error = vn_io_fault_uiomove((char *)bp->b_data + on, n, uio); if (error != 0 && !bp_cached) { /* diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c index af0e33b..966688f 100644 --- a/sys/fs/nfsclient/nfs_clvfsops.c +++ b/sys/fs/nfsclient/nfs_clvfsops.c @@ -1136,7 +1136,8 @@ nfs_mount(struct mount *mp) out: if (!error) { MNT_ILOCK(mp); - mp->mnt_kern_flag |= (MNTK_MPSAFE|MNTK_LOOKUP_SHARED); + mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | + MNTK_NO_IOPF; MNT_IUNLOCK(mp); } return (error); |