Skip to content

Commit e04d339

Browse files
committed
gfs2: don't lock sd_log_flush_lock in try_rgrp_unlink
In function try_rgrp_unlink, we added a temporary lock of the sd_log_flush_lock while searching the bitmaps. This protected us from problems in which dinodes being freed were still in a state of flux because the rgrp was in an active transaction. It was a kludge. Now that we've straightened out the code for inode eviction, deletes, and all the recovery mess, we no longer need this kludge. This patch removes it, and should improve performance. Signed-off-by: Bob Peterson <[email protected]>
1 parent 4bd684b commit e04d339

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/gfs2/rgrp.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,10 +1806,8 @@ static void try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked, u64 skip
18061806
struct gfs2_rbm rbm = { .rgd = rgd, .bii = 0, .offset = 0 };
18071807

18081808
while (1) {
1809-
down_write(&sdp->sd_log_flush_lock);
18101809
error = gfs2_rbm_find(&rbm, GFS2_BLKST_UNLINKED, NULL, NULL,
18111810
true);
1812-
up_write(&sdp->sd_log_flush_lock);
18131811
if (error == -ENOSPC)
18141812
break;
18151813
if (WARN_ON_ONCE(error))

0 commit comments

Comments
 (0)