mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-19 13:34:07 +00:00
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>
This commit is contained in:
parent
7427f3bb49
commit
660a6126f8
1 changed files with 3 additions and 0 deletions
|
@ -301,6 +301,9 @@ void gfs2_glock_queue_put(struct gfs2_glock *gl)
|
||||||
|
|
||||||
void gfs2_glock_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))
|
if (lockref_put_or_lock(&gl->gl_lockref))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue