From 9d05487f4a076f0fddb9b65089e0159a73903b11 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Wed, 20 Mar 2019 17:27:12 -0400 Subject: [PATCH] locks: ignore same lock in blocked_lock_hash Signed-off-by: Jeff Layton --- fs/locks.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/locks.c b/fs/locks.c index eb22f42f6496..66cd40f5d455 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1034,6 +1034,9 @@ static int posix_locks_deadlock(struct file_lock *caller_fl, if (i++ > MAX_DEADLK_ITERATIONS) return 0; if (posix_same_owner(caller_fl, block_fl)) { + /* Same lock? */ + if (caller_fl == block_fl) + return 0; if (found) return 1; found = true; -- 2.20.1