Skip to content

Commit

Permalink
gfs2: Simply dequeue iopen glock in gfs2_evict_inode
Browse files Browse the repository at this point in the history
With the previous change, to simplify things, we can always just dequeue
and uninitialize the iopen glock in gfs2_evict_inode() even if it isn't
queued anymore.

Signed-off-by: Andreas Gruenbacher <[email protected]>
  • Loading branch information
Andreas Gruenbacher committed Dec 6, 2022
1 parent 764665c commit fe1bff6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fs/gfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1419,12 +1419,9 @@ static void gfs2_evict_inode(struct inode *inode)
struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl;

glock_clear_object(gl, ip);
if (test_bit(HIF_HOLDER, &ip->i_iopen_gh.gh_iflags)) {
ip->i_iopen_gh.gh_flags |= GL_NOCACHE;
gfs2_glock_dq(&ip->i_iopen_gh);
}
gfs2_glock_hold(gl);
gfs2_holder_uninit(&ip->i_iopen_gh);
ip->i_iopen_gh.gh_flags |= GL_NOCACHE;
gfs2_glock_dq_uninit(&ip->i_iopen_gh);
gfs2_glock_put_eventually(gl);
}
if (ip->i_gl) {
Expand Down

0 comments on commit fe1bff6

Please sign in to comment.