summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_vnops.c
diff options
context:
space:
mode:
authortruckman <truckman@FreeBSD.org>2003-04-23 02:58:26 +0000
committertruckman <truckman@FreeBSD.org>2003-04-23 02:58:26 +0000
commitb8272feca3d1c50d46e8a57e2364e08d00e6d5e6 (patch)
tree008c46ef292be8f513cc09d2944d644849293a09 /sys/nfsclient/nfs_vnops.c
parent39047a4017ad524cae0f1c46941e6d4e16e01f99 (diff)
downloadFreeBSD-src-b8272feca3d1c50d46e8a57e2364e08d00e6d5e6.zip
FreeBSD-src-b8272feca3d1c50d46e8a57e2364e08d00e6d5e6.tar.gz
Release the vnode interlock in nfs_flush() before calling nfs_sigintr(),
and grab it again later if necessary. This prevents a lock order reversal because nfs_sigintr() calls PROC_LOCK().
Diffstat (limited to 'sys/nfsclient/nfs_vnops.c')
-rw-r--r--sys/nfsclient/nfs_vnops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index 5a2f6ad..fbd4f68 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -2838,8 +2838,8 @@ loop:
error = msleep((caddr_t)&vp->v_numoutput, VI_MTX(vp),
slpflag | (PRIBIO + 1), "nfsfsync", slptimeo);
if (error) {
+ VI_UNLOCK(vp);
if (nfs_sigintr(nmp, NULL, td)) {
- VI_UNLOCK(vp);
error = EINTR;
goto done;
}
@@ -2847,6 +2847,7 @@ loop:
slpflag = 0;
slptimeo = 2 * hz;
}
+ VI_LOCK(vp);
}
}
if (!TAILQ_EMPTY(&vp->v_dirtyblkhd) && commit) {
OpenPOWER on IntegriCloud