Skip to content

Commit

Permalink
GFS2: Always use iopen glock for gl_deletes
Browse files Browse the repository at this point in the history
Before this patch, when function try_rgrp_unlink queued a glock for
delete_work to reclaim the space, it used the inode glock to do so.
That's different from the iopen callback which uses the iopen glock
for the same purpose. We should be consistent and always use the
iopen glock. This may also save us reference counting problems with
the inode glock, since clear_glock does an extra glock_put() for the
inode glock.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
  • Loading branch information
Bob Peterson committed Dec 18, 2015
1 parent 783013c commit 5ea31bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/gfs2/rgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1789,7 +1789,7 @@ static void try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked, u64 skip
continue;
*last_unlinked = block;

error = gfs2_glock_get(sdp, block, &gfs2_inode_glops, CREATE, &gl);
error = gfs2_glock_get(sdp, block, &gfs2_iopen_glops, CREATE, &gl);
if (error)
continue;

Expand Down

0 comments on commit 5ea31bc

Please sign in to comment.