From: Darrick J. Wong Date: Thu, 31 May 2018 19:09:54 +0000 (-0500) Subject: xfs_buflock: ignore if buffer already locked X-Git-Tag: v4.17.0-rc1~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2b571f1b2cfcd4097b4cab6c929bbd59806ff64;p=thirdparty%2Fxfsprogs-dev.git xfs_buflock: ignore if buffer already locked If the trace data says we ran trylock but we were already locked, don't record another lock. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson Signed-off-by: Eric Sandeen --- diff --git a/tools/xfsbuflock.py b/tools/xfsbuflock.py index 82b6e01f5..cc15f582c 100755 --- a/tools/xfsbuflock.py +++ b/tools/xfsbuflock.py @@ -87,7 +87,8 @@ class Buffer: self.waiters = set() def trylock(self, process, time): - self.lockdone(process, time) + if not self.locked: + self.lockdone(process, time) def lockdone(self, process, time): if self.locked: