diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2017-02-22 20:05:09 +0100 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2017-04-03 09:14:47 -0400 |
commit | d4da31986c5da14277b3ecc479f1b0682756b54c (patch) | |
tree | 708fca3aabdb4810a024c77abad6013e767d3b26 /fs/gfs2/super.c | |
parent | 0a52aba7c2168636fc71635cf3ccb92a79a96c38 (diff) |
Revert "GFS2: Wait for iopen glock dequeues"
Revert commit 86d067a797d4e8546a7c92b985f31e8cd3ec39ad: it turns out
that waiting for iopen glock dequeues here isn't needed anymore because
the bugs that commit was meant to fix have been fixed otherwise.
In addition, we want to avoid waiting on glocks in gfs2_evict_inode in
shrinker context because the shrinker may be invoked on behalf of DLM,
in which case calling into DLM again would deadlock. This commit makes
the described scenario less likely without completely avoiding it; it's
still a step in the right direction, though.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r-- | fs/gfs2/super.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 2a9a830fb3d6..29b0473f6e74 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -1539,8 +1539,7 @@ static void gfs2_evict_inode(struct inode *inode) error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_SKIP, &gh); if (unlikely(error)) { ip->i_iopen_gh.gh_flags |= GL_NOCACHE; - gfs2_glock_dq_wait(&ip->i_iopen_gh); - gfs2_holder_uninit(&ip->i_iopen_gh); + gfs2_glock_dq_uninit(&ip->i_iopen_gh); goto out; } @@ -1618,7 +1617,7 @@ out_unlock: if (gfs2_holder_initialized(&ip->i_iopen_gh)) { if (test_bit(HIF_HOLDER, &ip->i_iopen_gh.gh_iflags)) { ip->i_iopen_gh.gh_flags |= GL_NOCACHE; - gfs2_glock_dq_wait(&ip->i_iopen_gh); + gfs2_glock_dq(&ip->i_iopen_gh); } gfs2_holder_uninit(&ip->i_iopen_gh); } @@ -1640,8 +1639,7 @@ out: if (gfs2_holder_initialized(&ip->i_iopen_gh)) { ip->i_iopen_gh.gh_gl->gl_object = NULL; ip->i_iopen_gh.gh_flags |= GL_NOCACHE; - gfs2_glock_dq_wait(&ip->i_iopen_gh); - gfs2_holder_uninit(&ip->i_iopen_gh); + gfs2_glock_dq_uninit(&ip->i_iopen_gh); } } |