svn commit: r351832 - projects/nfsv42/sys/fs/nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Wed Sep 4 21:43:53 UTC 2019
Author: rmacklem
Date: Wed Sep 4 21:43:52 2019
New Revision: 351832
URL: https://svnweb.freebsd.org/changeset/base/351832
Log:
Move vn_lock() down, so that it doesn't return ENOTTY with the vnode locked.
Modified:
projects/nfsv42/sys/fs/nfsclient/nfs_clvnops.c
Modified: projects/nfsv42/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- projects/nfsv42/sys/fs/nfsclient/nfs_clvnops.c Wed Sep 4 20:55:48 2019 (r351831)
+++ projects/nfsv42/sys/fs/nfsclient/nfs_clvnops.c Wed Sep 4 21:43:52 2019 (r351832)
@@ -3713,10 +3713,6 @@ nfs_ioctl(struct vop_ioctl_args *ap)
return (error);
}
- error = vn_lock(vp, LK_SHARED);
- if (error != 0)
- return (EBADF);
-
/* Do the actual NFSv4.2 RPC. */
switch (ap->a_command) {
case FIOSEEKDATA:
@@ -3728,6 +3724,10 @@ nfs_ioctl(struct vop_ioctl_args *ap)
default:
return (ENOTTY);
}
+
+ error = vn_lock(vp, LK_SHARED);
+ if (error != 0)
+ return (EBADF);
attrflag = 0;
if (*((off_t *)ap->a_data) >= VTONFS(vp)->n_size)
error = ENXIO;
More information about the svn-src-projects
mailing list