Author: rmacklem
Date: Fri May  9 00:28:07 2014
New Revision: 265723
URL: http://svnweb.freebsd.org/changeset/base/265723

Log:
  MFC: r264888
  The PR reported that the old NFS server did not set uio_td == NULL
  for the VOP_READ() call. This patch fixes both the old and new
  server for this case.

Modified:
  stable/9/sys/fs/nfsserver/nfs_nfsdport.c
  stable/9/sys/nfsserver/nfs_serv.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/fs/   (props changed)

Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/9/sys/fs/nfsserver/nfs_nfsdport.c    Fri May  9 00:24:11 2014        
(r265722)
+++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c    Fri May  9 00:28:07 2014        
(r265723)
@@ -674,6 +674,7 @@ nfsvno_read(struct vnode *vp, off_t off,
        uiop->uio_resid = len;
        uiop->uio_rw = UIO_READ;
        uiop->uio_segflg = UIO_SYSSPACE;
+       uiop->uio_td = NULL;
        nh = nfsrv_sequential_heuristic(uiop, vp);
        ioflag |= nh->nh_seqcount << IO_SEQSHIFT;
        error = VOP_READ(vp, uiop, IO_NODELOCKED | ioflag, cred);

Modified: stable/9/sys/nfsserver/nfs_serv.c
==============================================================================
--- stable/9/sys/nfsserver/nfs_serv.c   Fri May  9 00:24:11 2014        
(r265722)
+++ stable/9/sys/nfsserver/nfs_serv.c   Fri May  9 00:28:07 2014        
(r265723)
@@ -965,6 +965,7 @@ nfsrv_read(struct nfsrv_descript *nfsd, 
                uiop->uio_resid = len;
                uiop->uio_rw = UIO_READ;
                uiop->uio_segflg = UIO_SYSSPACE;
+               uiop->uio_td = NULL;
                nh = nfsrv_sequential_heuristic(uiop, vp);
                ioflag |= nh->nh_seqcount << IO_SEQSHIFT;
                error = VOP_READ(vp, uiop, IO_NODELOCKED | ioflag, cred);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to