]> Git Repo - linux.git/commitdiff
gfs2: check context in gfs2_glock_put
authorAlexander Aring <[email protected]>
Wed, 13 Oct 2021 14:02:00 +0000 (10:02 -0400)
committerAndreas Gruenbacher <[email protected]>
Mon, 25 Oct 2021 06:42:20 +0000 (08:42 +0200)
Add a might_sleep call into gfs2_glock_put which can sleep in DLM when
the last reference is released.  This will show problems earlier, and
not only when the last reference is put.

Signed-off-by: Alexander Aring <[email protected]>
Signed-off-by: Andreas Gruenbacher <[email protected]>
fs/gfs2/glock.c

index 6e3bd5ab91089d47aef765167f184162615b8136..19f38aee1b618d8355fb7b50cdc3992e6c13ea94 100644 (file)
@@ -301,6 +301,9 @@ void gfs2_glock_queue_put(struct gfs2_glock *gl)
 
 void gfs2_glock_put(struct gfs2_glock *gl)
 {
+       /* last put could call sleepable dlm api */
+       might_sleep();
+
        if (lockref_put_or_lock(&gl->gl_lockref))
                return;
 
This page took 0.059571 seconds and 4 git commands to generate.