]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Fix "Introduce flag for glock holder auto-demotion"
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 8 Nov 2021 15:08:07 +0000 (16:08 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 8 Nov 2021 15:29:28 +0000 (16:29 +0100)
commitca31ccce5a7951b7ae81d09b8012e7f4f2f1d1bb
treea8144a764814881e0e5efc1fe7c79c93d2b8c0a2
parenta8f59312c71b5e1ef7427031b49db7549ebbb6cd
gfs2: Fix "Introduce flag for glock holder auto-demotion"

Function demote_incompat_holders iterates over the list of glock holders
with list_for_each_entry, and it then sometimes removes the current
holder from the list.  This will get the loop stuck; we must use
list_for_each_entry_safe instead.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c