mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
nfs_clvnops.c: Fix access to v_mount when vnode unlocked
Commit ab17854f97
fixed access to v_mount when the
vnode is unlocked for nfs_copy_file_range().
This patch does the same for nfs_advlockasync().
MFC after: 1 week
This commit is contained in:
parent
497cdf9673
commit
a82308abab
|
@ -3417,11 +3417,13 @@ nfs_advlockasync(struct vop_advlockasync_args *ap)
|
|||
u_quad_t size;
|
||||
int error;
|
||||
|
||||
if (NFS_ISV4(vp))
|
||||
return (EOPNOTSUPP);
|
||||
error = NFSVOPLOCK(vp, LK_SHARED);
|
||||
if (error)
|
||||
return (error);
|
||||
if (NFS_ISV4(vp)) {
|
||||
NFSVOPUNLOCK(vp);
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
if ((VFSTONFS(vp->v_mount)->nm_flag & NFSMNT_NOLOCKD) != 0) {
|
||||
size = VTONFS(vp)->n_size;
|
||||
NFSVOPUNLOCK(vp);
|
||||
|
|
Loading…
Reference in a new issue