svn commit: r239852 - stable/9/sys/fs/nfsclient

Konstantin Belousov kib at FreeBSD.org
Wed Aug 29 15:58:45 UTC 2012


Author: kib
Date: Wed Aug 29 15:58:44 2012
New Revision: 239852
URL: http://svn.freebsd.org/changeset/base/239852

Log:
  MFC r237367:
  Enable deadlock avoidance code for NFS client.

Modified:
  stable/9/sys/fs/nfsclient/nfs_clbio.c
  stable/9/sys/fs/nfsclient/nfs_clvfsops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/fs/   (props changed)

Modified: stable/9/sys/fs/nfsclient/nfs_clbio.c
==============================================================================
--- stable/9/sys/fs/nfsclient/nfs_clbio.c	Wed Aug 29 15:56:25 2012	(r239851)
+++ stable/9/sys/fs/nfsclient/nfs_clbio.c	Wed Aug 29 15:58:44 2012	(r239852)
@@ -698,7 +698,7 @@ ncl_bioread(struct vnode *vp, struct uio
 	    };
 
 	    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;
@@ -1179,7 +1179,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) {
 			/*

Modified: stable/9/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- stable/9/sys/fs/nfsclient/nfs_clvfsops.c	Wed Aug 29 15:56:25 2012	(r239851)
+++ stable/9/sys/fs/nfsclient/nfs_clvfsops.c	Wed Aug 29 15:58:44 2012	(r239852)
@@ -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);


More information about the svn-src-stable mailing list