提交 e6950a4d 编写于 作者: F Frederic Weisbecker

kill-the-BKL/reiserfs: release the write lock before rescheduling on 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: NFrederic Weisbecker <fweisbec@gmail.com>
上级 f32049dc
...@@ -4232,7 +4232,9 @@ static int do_journal_end(struct reiserfs_transaction_handle *th, ...@@ -4232,7 +4232,9 @@ static int do_journal_end(struct reiserfs_transaction_handle *th,
next = cn->next; next = cn->next;
free_cnode(sb, cn); free_cnode(sb, cn);
cn = next; cn = next;
reiserfs_write_unlock(sb);
cond_resched(); cond_resched();
reiserfs_write_lock(sb);
} }
/* we are done with both the c_bh and d_bh, but /* we are done with both the c_bh and d_bh, but
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册