Skip to content

Commit 660a612

Browse files
Alexander AringAndreas Gruenbacher
authored andcommitted
gfs2: check context in gfs2_glock_put
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 <aahringo@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent 7427f3b commit 660a612

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

fs/gfs2/glock.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@ void gfs2_glock_queue_put(struct gfs2_glock *gl)
301301

302302
void gfs2_glock_put(struct gfs2_glock *gl)
303303
{
304+
/* last put could call sleepable dlm api */
305+
might_sleep();
306+
304307
if (lockref_put_or_lock(&gl->gl_lockref))
305308
return;
306309

0 commit comments

Comments
 (0)