diff options
Diffstat (limited to 'fs/jbd')
-rw-r--r-- | fs/jbd/transaction.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 932e7c1ef4a1..77b7662b840b 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c | |||
@@ -1812,7 +1812,17 @@ static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh) | |||
1812 | } | 1812 | } |
1813 | } | 1813 | } |
1814 | } else if (transaction == journal->j_committing_transaction) { | 1814 | } else if (transaction == journal->j_committing_transaction) { |
1815 | /* If it is committing, we simply cannot touch it. We | 1815 | if (jh->b_jlist == BJ_Locked) { |
1816 | /* | ||
1817 | * The buffer is on the committing transaction's locked | ||
1818 | * list. We have the buffer locked, so I/O has | ||
1819 | * completed. So we can nail the buffer now. | ||
1820 | */ | ||
1821 | may_free = __dispose_buffer(jh, transaction); | ||
1822 | goto zap_buffer; | ||
1823 | } | ||
1824 | /* | ||
1825 | * If it is committing, we simply cannot touch it. We | ||
1816 | * can remove it's next_transaction pointer from the | 1826 | * can remove it's next_transaction pointer from the |
1817 | * running transaction if that is set, but nothing | 1827 | * running transaction if that is set, but nothing |
1818 | * else. */ | 1828 | * else. */ |
@@ -1887,7 +1897,6 @@ int journal_invalidatepage(journal_t *journal, | |||
1887 | unsigned int next_off = curr_off + bh->b_size; | 1897 | unsigned int next_off = curr_off + bh->b_size; |
1888 | next = bh->b_this_page; | 1898 | next = bh->b_this_page; |
1889 | 1899 | ||
1890 | /* AKPM: doing lock_buffer here may be overly paranoid */ | ||
1891 | if (offset <= curr_off) { | 1900 | if (offset <= curr_off) { |
1892 | /* This block is wholly outside the truncation point */ | 1901 | /* This block is wholly outside the truncation point */ |
1893 | lock_buffer(bh); | 1902 | lock_buffer(bh); |