Commit 8b7eec3b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] JBD: do_get_write_access() speedup

Avoid holding the journal's j_list_lock while copying the buffer_head's data.
We hold jbd_lock_bh_state() during the copy, which is all that is needed.
parent fba1fdee
......@@ -699,6 +699,7 @@ do_get_write_access(handle_t *handle, struct journal_head *jh,
}
done_locked:
spin_unlock(&journal->j_list_lock);
if (need_copy) {
struct page *page;
int offset;
......@@ -712,7 +713,6 @@ do_get_write_access(handle_t *handle, struct journal_head *jh,
memcpy(jh->b_frozen_data, source+offset, jh2bh(jh)->b_size);
kunmap_atomic(source, KM_USER0);
}
spin_unlock(&journal->j_list_lock);
jbd_unlock_bh_state(bh);
/* If we are about to journal a buffer, then any revoke pending
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment