Don't allow the readdirplus routine to be used in NFS V2.
PR: 5102 Reviewed by: msmith Submitted by: Dmitry Kohmanyuk <dk@farm.org>
This commit is contained in:
parent
38c76440b8
commit
b9921401f1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=34930
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
|
||||
* $Id: nfs_bio.c,v 1.52 1998/03/07 21:36:01 dyson Exp $
|
||||
* $Id: nfs_bio.c,v 1.53 1998/03/08 09:57:54 julian Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -1148,6 +1148,8 @@ nfs_doio(bp, cr, p)
|
||||
case VDIR:
|
||||
nfsstats.readdir_bios++;
|
||||
uiop->uio_offset = ((u_quad_t)bp->b_lblkno) * NFS_DIRBLKSIZ;
|
||||
if (!(nmp->nm_flag & NFSMNT_NFSV3))
|
||||
nmp->nm_flag &= ~NFSMNT_RDIRPLUS;
|
||||
if (nmp->nm_flag & NFSMNT_RDIRPLUS) {
|
||||
error = nfs_readdirplusrpc(vp, uiop, cr);
|
||||
if (error == NFSERR_NOTSUPP)
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
|
||||
* $Id: nfs_bio.c,v 1.52 1998/03/07 21:36:01 dyson Exp $
|
||||
* $Id: nfs_bio.c,v 1.53 1998/03/08 09:57:54 julian Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -1148,6 +1148,8 @@ nfs_doio(bp, cr, p)
|
||||
case VDIR:
|
||||
nfsstats.readdir_bios++;
|
||||
uiop->uio_offset = ((u_quad_t)bp->b_lblkno) * NFS_DIRBLKSIZ;
|
||||
if (!(nmp->nm_flag & NFSMNT_NFSV3))
|
||||
nmp->nm_flag &= ~NFSMNT_RDIRPLUS;
|
||||
if (nmp->nm_flag & NFSMNT_RDIRPLUS) {
|
||||
error = nfs_readdirplusrpc(vp, uiop, cr);
|
||||
if (error == NFSERR_NOTSUPP)
|
||||
|
Loading…
Reference in New Issue
Block a user