aboutsummaryrefslogtreecommitdiff
path: root/sys/ufs
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2016-09-08 12:08:54 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2016-09-08 12:08:54 +0000
commit7b05b8a29cf9c50d5d6210b802dd39f16dfa0627 (patch)
tree02eaa5f6715afa4448dc4a2ce7600880e1c816d3 /sys/ufs
parent76db05eb14d958b40e8bd3a7c48cbd4490077843 (diff)
downloadsrc-7b05b8a29cf9c50d5d6210b802dd39f16dfa0627.tar.gz
src-7b05b8a29cf9c50d5d6210b802dd39f16dfa0627.zip
Do not leak transient ENOLCK error from flush_newblk_dep() loop.
The buffer lock is retried on failed LK_SLEEPFAIL attempt, and error from the failed attempt is irrelevant. But since there is path after retry which does not clear error, it is possible to return spurious error from the function. The issue resulted in a spurious failure of softdep_sync_buf(), causing further spurious failure of ffs_sync(). In collaboration with: pho Reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=305599
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_softdep.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 122848dced7e..7434974ce9c6 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -12954,6 +12954,7 @@ flush_newblk_dep(vp, mp, lbn)
LK_INTERLOCK, BO_LOCKPTR(bo));
if (error == ENOLCK) {
ACQUIRE_LOCK(ump);
+ error = 0;
continue; /* Slept, retry */
}
if (error != 0)