From 59c30d0f5e1846983653e971b63590d36af511dd Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 6 Aug 2003 21:14:52 -0700 Subject: [PATCH] [PATCH] ext3: handle aborted journals in Teach journal_get_write_access() and journal_get_undo_access() to handle aborted trasaction handles. --- fs/jbd/transaction.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 83de01cd53f52..cf9edd99e4921 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c @@ -525,12 +525,18 @@ do_get_write_access(handle_t *handle, struct journal_head *jh, int force_copy, int *credits) { struct buffer_head *bh; - transaction_t *transaction = handle->h_transaction; - journal_t *journal = transaction->t_journal; + transaction_t *transaction; + journal_t *journal; int error; char *frozen_buffer = NULL; int need_copy = 0; + if (is_handle_aborted(handle)) + return -EROFS; + + transaction = handle->h_transaction; + journal = transaction->t_journal; + jbd_debug(5, "buffer_head %p, force_copy %d\n", jh, force_copy); JBUFFER_TRACE(jh, "entry"); -- 2.53.0