From b8253fff0ea06e374bf33c8e5d884283528cd9ae Mon Sep 17 00:00:00 2001 From: "akpm@osdl.org" Date: Sat, 16 Apr 2005 15:26:36 -0700 Subject: [PATCH] --- yaml --- r: 192 b: refs/heads/master c: d13df84ff7f3f3e26a9643c1d3cbf94cef9b5b59 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/jbd/transaction.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index e9aa709f7760..bbb300046baf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 19272d4385126c2ac369c9f6137a27a08aee50d1 +refs/heads/master: d13df84ff7f3f3e26a9643c1d3cbf94cef9b5b59 diff --git a/trunk/fs/jbd/transaction.c b/trunk/fs/jbd/transaction.c index 932e7c1ef4a1..77b7662b840b 100644 --- a/trunk/fs/jbd/transaction.c +++ b/trunk/fs/jbd/transaction.c @@ -1812,7 +1812,17 @@ static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh) } } } else if (transaction == journal->j_committing_transaction) { - /* If it is committing, we simply cannot touch it. We + if (jh->b_jlist == BJ_Locked) { + /* + * The buffer is on the committing transaction's locked + * list. We have the buffer locked, so I/O has + * completed. So we can nail the buffer now. + */ + may_free = __dispose_buffer(jh, transaction); + goto zap_buffer; + } + /* + * If it is committing, we simply cannot touch it. We * can remove it's next_transaction pointer from the * running transaction if that is set, but nothing * else. */ @@ -1887,7 +1897,6 @@ int journal_invalidatepage(journal_t *journal, unsigned int next_off = curr_off + bh->b_size; next = bh->b_this_page; - /* AKPM: doing lock_buffer here may be overly paranoid */ if (offset <= curr_off) { /* This block is wholly outside the truncation point */ lock_buffer(bh);