summaryrefslogtreecommitdiff
path: root/sys/fs/nfsclient/nfs_clvnops.c
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2011-11-14 00:10:11 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2011-11-14 00:10:11 +0000
commit670bf6f1260507d72869749d4d71df1f9793521e (patch)
tree3e420f270799b7da6d29fbbdf7ac197097553f82 /sys/fs/nfsclient/nfs_clvnops.c
parent90379d6116db8f572ef953907a503927498c8f46 (diff)
downloadsrc-test2-670bf6f1260507d72869749d4d71df1f9793521e.tar.gz
src-test2-670bf6f1260507d72869749d4d71df1f9793521e.zip
Notes
Diffstat (limited to 'sys/fs/nfsclient/nfs_clvnops.c')
-rw-r--r--sys/fs/nfsclient/nfs_clvnops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index 7e87b6e71a10..ee3c8d917f25 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -2941,6 +2941,8 @@ nfs_advlock(struct vop_advlock_args *ap)
u_quad_t size;
if (NFS_ISV4(vp) && (ap->a_flags & (F_POSIX | F_FLOCK)) != 0) {
+ if (vp->v_type != VREG)
+ return (EINVAL);
if ((ap->a_flags & F_POSIX) != 0)
cred = p->p_ucred;
else