Skip to content

Commit

Permalink
kill-the-BKL/reiserfs: release the write lock before rescheduling on …
Browse files Browse the repository at this point in the history
…do_journal_end()

When do_journal_end() copies data to the journal blocks buffers in memory,
it reschedules if needed between each block copied and dirtyfied.

We can also release the write lock at this rescheduling stage,
like did the bkl implicitly.

[ Impact: release the reiserfs write lock when it is not needed ]

Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
  • Loading branch information
Frederic Weisbecker committed Sep 14, 2009
1 parent f32049d commit e6950a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/reiserfs/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -4232,7 +4232,9 @@ static int do_journal_end(struct reiserfs_transaction_handle *th,
next = cn->next;
free_cnode(sb, cn);
cn = next;
reiserfs_write_unlock(sb);
cond_resched();
reiserfs_write_lock(sb);
}

/* we are done with both the c_bh and d_bh, but
Expand Down

0 comments on commit e6950a4

Please sign in to comment.