Skip to content

Commit

Permalink
Enable deadlock avoidance code for NFS client.
Browse files Browse the repository at this point in the history
MFC after:	2 weeks
  • Loading branch information
kostikbel committed Jun 21, 2012
1 parent 7aac7bc commit ddfc47f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sys/fs/nfsclient/nfs_clbio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1203,7 +1203,7 @@ ncl_write(struct vop_write_args *ap)
}

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) {
/*
Expand Down
3 changes: 2 additions & 1 deletion sys/fs/nfsclient/nfs_clvfsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ddfc47f

Please sign in to comment.